﻿/* ==========================================================
   SIGNFIY - Standalone Electronic Signature System
   Dedicated stylesheet. No dependency on CMS/calculator CSS.
   ========================================================== */

*{box-sizing:border-box}
html,body{min-height:100%}
body{
    margin:0;
    direction:rtl;
    font-family:Arial,Tahoma,sans-serif;
    color:#123d66;
    background:#dff3ff;
}
.sf-header{
    direction:ltr;
    min-height:145px;
    padding:22px 48px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    background:linear-gradient(90deg,#b9e7ff 0%,#daf4ff 50%,#b9e7ff 100%);
    border-bottom:1px solid #a8d8ef;
    box-shadow:0 2px 10px rgba(23,91,140,.10)
}
.sf-brand,.galilit-brand{display:flex;align-items:center;gap:15px}
.sf-logo{
    width:82px;height:82px;border:5px solid #1379c9;border-radius:15px;
    background:#f7fcff;position:relative;box-shadow:0 4px 12px rgba(7,90,166,.15)
}
.sf-logo:before{
    content:"";position:absolute;left:17px;top:20px;width:38px;height:5px;
    border-radius:4px;background:#29a8e8;
    box-shadow:0 15px 0 #29a8e8,0 30px 0 #29a8e8
}
.sf-logo:after{
    content:"✓";position:absolute;right:-13px;bottom:-15px;width:44px;height:44px;
    line-height:44px;text-align:center;border-radius:50%;font-size:30px;font-weight:900;
    color:#fff;background:#075aa6;border:4px solid #d8f3ff
}
.sf-name{text-align:left;line-height:1}
.sf-name strong{display:block;font-size:48px;letter-spacing:1px;color:#075aa6}
.sf-name span{display:block;direction:rtl;margin-top:9px;font-size:18px;font-weight:700;color:#075aa6}
.galilit-logo{
    width:74px;height:74px;display:grid;place-items:center;border-radius:50%;
    background:linear-gradient(145deg,#075aa6,#25a9ec);color:#fff;
    font-size:42px;font-weight:900;box-shadow:0 4px 12px rgba(7,90,166,.15)
}
.galilit-text{direction:rtl;text-align:right;line-height:1.05}
.galilit-text strong{display:block;font-size:38px;color:#075aa6}
.galilit-text span{display:block;margin-top:5px;font-size:15px;color:#286c9f}
.galilit-text em{display:block;direction:ltr;margin-top:4px;font-style:normal;font-size:16px;font-weight:700;color:#075aa6}
.sf-main{max-width:1500px;margin:0 auto;padding:35px 36px 55px}
.sf-error{
    max-width:1000px;margin:0 auto 22px;padding:15px 18px;border:1px solid #e2a5a5;
    border-radius:10px;background:#fff0f0;color:#9f2020;font-weight:700
}
.status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:22px}
.status-card{
    min-height:190px;padding:25px 18px;display:flex;flex-direction:column;
    align-items:center;justify-content:center;text-decoration:none;color:#123d66;
    background:#fff;border:1px solid #c4ddea;border-radius:15px;
    box-shadow:0 5px 16px rgba(28,91,139,.09);
    transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease
}
.status-card:hover{transform:translateY(-2px);border-color:#71b9e2;box-shadow:0 8px 20px rgba(28,91,139,.14)}
.status-icon{
    width:62px;height:62px;margin-bottom:8px;display:grid;place-items:center;
    border-radius:50%;font-size:34px;font-weight:900
}
.waiting .status-icon{color:#075aa6;background:#d8ebff}
.signed .status-icon{color:#16833b;background:#dff4e5}
.rejected .status-icon{color:#d42b2b;background:#ffe1e1}
.expired .status-icon{color:#d68b00;background:#fff0cc}
.status-number{margin-top:2px;font-size:34px;line-height:1;font-weight:900;color:#075aa6}
.status-label{margin-top:10px;font-size:18px;font-weight:800}
.new-wrap{text-align:center;margin-top:48px}
.new-doc{
    min-width:390px;padding:18px 34px;display:inline-flex;align-items:center;
    justify-content:center;gap:20px;text-decoration:none;color:#fff;
    background:linear-gradient(180deg,#269fe7,#0864bd);border:1px solid #0864bd;
    border-radius:16px;box-shadow:0 8px 20px rgba(8,100,189,.22)
}
.new-doc:hover{background:linear-gradient(180deg,#35aaf0,#075aa6)}
.new-icon{font-size:38px;font-weight:300;line-height:1}
.new-text strong{display:block;font-size:25px}
.new-text span{display:block;direction:ltr;margin-top:3px;font-size:16px;letter-spacing:1px}
.sf-footer{text-align:center;margin-top:42px}
.back-link{
    display:inline-block;padding:9px 18px;border:1px solid #8dbbd7;border-radius:8px;
    background:rgba(255,255,255,.75);color:#075aa6;text-decoration:none;font-weight:700
}
@media(max-width:900px){
    .sf-header{padding:18px;min-height:120px}
    .sf-name strong{font-size:34px}.galilit-text strong{font-size:28px}
    .status-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:580px){
    .sf-header{flex-direction:column}
    .status-grid{grid-template-columns:1fr}
    .new-doc{min-width:0;width:100%}
    .sf-main{padding:24px 15px 40px}
}


/* Original Galilit logo supplied by Galilit - do not redesign or replace. */
.galilit-brand{
    justify-content:flex-end;
}
.galilit-original-logo{
    display:block;
    width:185px;
    max-height:112px;
    object-fit:contain;
    object-position:center;
    mix-blend-mode:multiply;
}

/* Footer */
.sf-footer{
    margin-top:42px;
    padding-top:18px;
    border-top:1px solid rgba(7,90,166,.18);
}
.rights{
    margin-top:18px;
    padding:12px 8px 2px;
    direction:rtl;
    text-align:center;
    font-size:13px;
    color:#39749e;
}

@media(max-width:580px){
    .galilit-original-logo{width:155px;max-height:95px}
}

.sf-user{font-size:13px!important;font-weight:400!important;margin-top:8px!important;color:#39749e!important}


/* ==========================================================
   NEW DOCUMENT
   ========================================================== */
.document-panel{
    max-width:1050px;
    margin:0 auto;
    overflow:hidden;
    background:rgba(255,255,255,.94);
    border:1px solid #bddbea;
    border-radius:16px;
    box-shadow:0 7px 22px rgba(28,91,139,.10);
}
.document-panel-title{
    padding:22px 30px;
    text-align:center;
    background:linear-gradient(180deg,#e9f8ff,#d7f1ff);
    border-bottom:1px solid #c5dfed;
}
.document-panel-title h1{
    margin:0;
    color:#075aa6;
    font-size:29px;
}
.document-panel-title div{
    margin-top:4px;
    direction:ltr;
    color:#4c82aa;
    font-size:13px;
    letter-spacing:1.5px;
    font-weight:700;
}
.document-form{padding:30px}
.form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:22px 26px;
}
.form-field{display:flex;flex-direction:column;gap:8px}
.form-wide{grid-column:1/-1}
.form-field label{font-size:15px;font-weight:800;color:#164f7c}
.required{color:#cf2d2d}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="date"]{
    width:100%;
    min-height:45px;
    padding:9px 12px;
    font:inherit;
    color:#173c5d;
    background:#fff;
    border:1px solid #a9cde1;
    border-radius:8px;
    outline:none;
}
.form-field input:focus{border-color:#168bd0;box-shadow:0 0 0 3px rgba(22,139,208,.10)}
.pdf-upload-box{
    padding:22px;
    text-align:center;
    background:#edf9ff;
    border:2px dashed #7ebce0;
    border-radius:11px;
}
.pdf-upload-box input[type="file"]{
    width:100%;
    max-width:620px;
    font:inherit;
    color:#164f7c;
}
.upload-note{margin-top:12px;font-size:13px;color:#56809e}
.form-actions{
    margin-top:30px;
    display:flex;
    justify-content:center;
    gap:14px;
    flex-wrap:wrap;
}
.primary-action,.secondary-action{
    min-width:190px;
    padding:13px 25px;
    border-radius:9px;
    font:inherit;
    font-size:16px;
    font-weight:800;
    cursor:pointer;
    text-decoration:none;
    text-align:center;
}
.primary-action{
    color:#fff;
    border:1px solid #075aa6;
    background:linear-gradient(180deg,#279fe7,#0864bd);
}
.primary-action:hover{background:linear-gradient(180deg,#35aaf0,#075aa6)}
.secondary-action{
    color:#075aa6;
    border:1px solid #8dbbd7;
    background:#f7fcff;
}
@media(max-width:700px){
    .form-grid{grid-template-columns:1fr}
    .form-wide{grid-column:auto}
    .document-form{padding:20px 15px}
}


/* SIGNFIY header alignment with CMS / GALILIT.CO.IL:
   white background preserves the original Galilit logo exactly as supplied. */
.sf-header{
    background:#ffffff !important;
    border-bottom:1px solid #d7e6ef !important;
}
.galilit-original-logo{
    mix-blend-mode:normal !important;
}


/* Galilit logo - proportional to SIGNFIY header height */
.galilit-original-logo{
    width:auto !important;
    height:118px !important;
    max-height:118px !important;
    object-fit:contain !important;
}
@media(max-width:900px){
    .galilit-original-logo{
        width:auto !important;
        height:96px !important;
        max-height:96px !important;
    }
}


/* Galilit logo fills the header height while preserving aspect ratio */
.sf-header{
    min-height:150px !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
}
.galilit-brand{
    height:150px !important;
    display:flex !important;
    align-items:center !important;
}
.galilit-original-logo{
    height:150px !important;
    max-height:150px !important;
    width:auto !important;
    max-width:none !important;
    object-fit:contain !important;
    display:block !important;
}
@media(max-width:900px){
    .sf-header{min-height:120px !important}
    .galilit-brand{height:120px !important}
    .galilit-original-logo{
        height:120px !important;
        max-height:120px !important;
        width:auto !important;
    }
}

.login-panel{
    max-width:520px;
    margin:35px auto;
    overflow:hidden;
    background:#fff;
    border:1px solid #bddbea;
    border-radius:16px;
    box-shadow:0 7px 22px rgba(28,91,139,.10);
}
.login-form{padding:30px}
.login-error{
    margin-bottom:20px;
    padding:12px 14px;
    border:1px solid #e4b6b6;
    border-radius:8px;
    background:#fff3f3;
    color:#a12626;
    font-weight:700;
}
.form-field input[type="password"]{
    width:100%;
    min-height:45px;
    padding:9px 12px;
    font:inherit;
    color:#173c5d;
    background:#fff;
    border:1px solid #a9cde1;
    border-radius:8px;
    outline:none;
}


/* ==========================================================
   SIGNFIY HOME - CLEAN MANAGEMENT BAR + FOOTER
   Right: company | Center: username + logout | Left: date + clock
   ========================================================== */
.sf-info-bar{
    width:100%;
    max-width:none;
    margin:0;
    padding:12px 42px;
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    align-items:center;
    direction:rtl;
    background:rgba(255,255,255,.72);
    border-bottom:1px solid rgba(7,90,166,.14);
}

.sf-info-company{
    grid-column:1;
    justify-self:start;
    margin:0;
    color:#075aa6;
    font-size:23px;
    font-weight:900;
    white-space:nowrap;
}

.sf-info-center{
    grid-column:2;
    justify-self:center;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:30px;
    color:#315f82;
    font-size:15px;
    white-space:nowrap;
}
.sf-info-user{
    margin:0;
    color:#315f82;
    font-size:15px;
}
.sf-info-user strong,
.sf-info-datetime strong{color:#164f7c}

.sf-logout{
    display:inline-block;
    padding:7px 18px;
    border:1px solid #8dbbd7;
    border-radius:8px;
    background:#fff;
    color:#075aa6;
    text-decoration:none;
    font-weight:800;
}
.sf-logout:hover{background:#edf8ff}

.sf-info-datetime{
    grid-column:3;
    justify-self:end;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:24px;
    direction:rtl;
    color:#315f82;
    font-size:15px;
    white-space:nowrap;
}
#sf-live-clock{
    direction:ltr;
    display:inline-block;
    min-width:70px;
    font-variant-numeric:tabular-nums;
}

/* Footer */
.sf-footer{
    margin-top:90px;
    padding-top:26px;
    text-align:center;
    border-top:1px solid rgba(7,90,166,.18);
}
.sf-footer-actions{margin-bottom:34px}

.sf-footer-nav{
    width:min(1250px,96%);
    margin:0 auto;
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:26px;
    align-items:center;
}
.sf-footer-nav a{
    display:block;
    width:100%;
    padding:9px 8px;
    border:1px solid #a8cde1;
    border-radius:8px;
    background:rgba(255,255,255,.78);
    color:#075aa6;
    text-decoration:none;
    font-size:14px;
    font-weight:700;
    text-align:center;
    white-space:nowrap;
}
.sf-footer-nav a:hover{
    background:#fff;
    border-color:#65add7;
}
.rights{
    margin-top:26px;
    padding:12px 8px 2px;
    direction:rtl;
    text-align:center;
    font-size:13px;
    color:#39749e;
}

@media(max-width:950px){
    .sf-info-bar{
        grid-template-columns:1fr;
        row-gap:12px;
        padding:12px 18px;
    }
    .sf-info-company,
    .sf-info-center,
    .sf-info-datetime{
        grid-column:1;
        justify-self:center;
    }
    .sf-footer-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:580px){
    .sf-info-center,.sf-info-datetime{flex-wrap:wrap}
    .sf-footer-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}


/* MELLERA unified header - same header presentation as HOME */
.mellera-header-logo{display:block;width:auto;height:auto;max-height:118px;max-width:520px;object-fit:contain}
.sf-public-company{margin-bottom:8px;color:#075aa6;font-size:20px;font-weight:900}
@media(max-width:900px){.mellera-header-logo{max-height:96px;max-width:420px}}
@media(max-width:580px){.mellera-header-logo{max-height:82px;max-width:92vw}}
