/*
=========================================================
 SAFE HAND INSURANCE
 MASTER COMMON STYLESHEET
=========================================================

 One CSS file for the complete application.

 Sections:
 01. Global
 02. Common Components
 03. Sidebar
 04. Header
 05. Footer
 06. Forms / Cards / Tables
 07. OCR / PDF
 08. Login
 09. Dashboard / Reports
 10. Responsive / Mobile

 IMPORTANT:
 - Existing project styling has been preserved.
 - Header / Sidebar / Footer remain common.
 - Page-specific rules are scoped where possible.
 - Do NOT create a separate CSS file for every page.
=========================================================
*/


/* =======================================================
   01. GLOBAL
======================================================= */

html{
    min-height:100%;
}

body{
    min-height:100%;
    margin:0;
    padding:0;
    background:#eef2f7;
    font-family:Segoe UI,Tahoma,sans-serif;
    font-size:14px;
    color:#333;
}

*,
*::before,
*::after{
    box-sizing:border-box;
}

img{
    max-width:100%;
    height:auto;
}

button,
input,
select,
textarea{
    font-family:inherit;
}

a{
    text-decoration:none;
}

.clearfix::after{
    content:"";
    display:table;
    clear:both;
}


/* =======================================================
   02. COMMON COMPONENTS
======================================================= */

.navbar-brand{
    font-weight:700;
    font-size:24px;
}

.main-card{
    border:none;
    border-radius:15px;
    overflow:hidden;
    box-shadow:0 5px 18px rgba(0,0,0,.08);
    margin-bottom:20px;
}

.card-header{
    background:#0d6efd;
    color:#fff;
    font-weight:600;
    font-size:16px;
    border-radius:14px 14px 0 0!important;
}

.form-control,
.form-select{
    height:42px;
    border-radius:8px;
}

.form-control:focus,
.form-select:focus{
    box-shadow:none;
    border-color:#0d6efd;
}

label,
.form-label{
    font-weight:600;
    margin-bottom:5px;
}

.progress{
    height:20px;
}

.status-found{
    color:#198754;
    font-weight:bold;
}

.status-missing{
    color:#dc3545;
    font-weight:bold;
}

.shadow-box{
    background:#fff;
    border-radius:10px;
    padding:20px;
    box-shadow:0 4px 15px rgba(0,0,0,.06);
}

.section-title{
    font-size:17px;
    font-weight:bold;
    color:#0d6efd;
    margin-bottom:15px;
}

.page-title{
    font-size:28px;
    font-weight:bold;
    color:#0d6efd;
}

.section-icon{
    font-size:18px;
    margin-right:8px;
}

.btn-save{
    background:#198754;
    color:#fff;
}

.btn-save:hover{
    background:#157347;
    color:#fff;
}

.btn-back{
    background:#6c757d;
    color:#fff;
}

.btn-back:hover{
    background:#5c636a;
    color:#fff;
}

.sticky-footer{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    background:#fff;
    padding:15px;
    box-shadow:0 -3px 15px rgba(0,0,0,.1);
    z-index:999;
}


/* =======================================================
   03. SIDEBAR
======================================================= */

.sidebar{
    position:fixed;
    left:0;
    top:0;
    width:250px;
    height:100vh;
    background:#0d6efd;
    overflow:auto;
    box-shadow:4px 0 15px rgba(0,0,0,.15);
    z-index:1000;
}

.sidebar .logo{
    padding:25px;
    text-align:center;
    color:#FF5722;
    border-bottom:1px solid rgba(255,255,255,.2);
}

.sidebar .logo h5{
    margin-top:10px;
    margin-bottom:0;
    font-weight:bold;
}

.sidebar .logo small{
    opacity:.8;
}

.sidebar a{
    display:block;
    padding:14px 25px;
    color:#fff;
    text-decoration:none;
    transition:.3s;
    font-size:15px;
}

.sidebar a:hover{
    background:#0b5ed7;
    padding-left:35px;
}

.sidebar i{
    margin-right:10px;
}


/* =======================================================
   04. HEADER
======================================================= */

.main-content{
    margin-left:250px;
    margin-top:80px;
    margin-right:20px;
    padding:25px;
    min-height:100vh;
    transition:.3s;
}

.top-header{
    position:fixed;
    top:0;
    left:300px;
    right:0;
    height:72px;
    background:#F8FBFF;
    border-bottom:2px solid #2563EB;
    box-shadow:0 4px 15px rgba(37,99,235,.08);
    z-index:990;
}

.header-left{
    display:flex;
    align-items:center;
    gap:20px;
}

.header-right{
    display:flex;
    align-items:center;
    gap:20px;
}

.header-logo{
    width:45px;
    height:45px;
    object-fit:contain;
}

/* Standard Safe Hand logo helper */
.safe-hand-logo{
    display:block;
    height:auto;
    max-width:100%;
}

.user-box{
    position:relative;
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
}

.notification{
    position:relative;
    font-size:20px;
    cursor:pointer;
}

.notify-count{
    position:absolute;
    top:-6px;
    right:-8px;
    width:18px;
    height:18px;
    background:#ff3b30;
    color:#fff;
    border-radius:50%;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:10px;
}


/* =======================================================
   05. FOOTER
======================================================= */

.app-footer{
    width:100%;
    margin-top:20px;
    background:#ffffff;
    border-top:1px solid #D9E2F2;
    box-shadow:0 -3px 12px rgba(15,23,42,.04);
    box-sizing:border-box;
}

.footer-inner{
    min-height:58px;
    padding:10px 24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    box-sizing:border-box;
}

.footer-brand{
    display:flex;
    flex-direction:column;
    gap:2px;
    min-width:220px;
}

.footer-brand strong{
    color:#1E3A8A;
    font-size:13px;
    font-weight:700;
}

.footer-brand span{
    color:#64748B;
    font-size:11px;
    font-weight:500;
}

.footer-center{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    color:#64748B;
    font-size:11px;
    font-weight:500;
    text-align:center;
}

.footer-dot{
    color:#F97316;
    font-size:13px;
}

.footer-status{
    display:flex;
    align-items:center;
    gap:7px;
    color:#475569;
    font-size:11px;
    font-weight:600;
    min-width:100px;
    justify-content:flex-end;
}

.status-dot{
    width:7px;
    height:7px;
    border-radius:50%;
    background:#16A34A;
    box-shadow:0 0 0 3px rgba(22,163,74,.12);
}


/* =======================================================
   06. FORMS / CARDS / TABLES
======================================================= */

.table-responsive{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

table{
    max-width:100%;
}

.pdf-box{
    height:900px;
    border-radius:10px;
    overflow:hidden;
    border:1px solid #ddd;
    background:#fff;
}


/* =======================================================
   07. OCR / PDF
======================================================= */

.ocr-confidence-bar{
    margin-top:0!important;
    margin-bottom:5px!important;
    padding:12px 16px!important;
    border-radius:8px!important;
}

#mainContent{
    padding-top:0!important;
}

#mainContent .container-fluid{
    padding-top:0!important;
}

#mainContent > .container-fluid{
    margin-top:0!important;
}

.ocr-confidence-bar + .container-fluid{
    margin-top:0!important;
    padding-top:0!important;
}

.pdf-box{
    height:670px;
    overflow:hidden;
}

.pdf-box iframe{
    width:100%;
    height:670px!important;
    border:none;
    display:block;
}


/* =======================================================
   08. LOGIN
======================================================= */

body#login{
    min-height:100vh;
    margin:0;
    padding:0;
    background:#f5f6f8;
}

#login .app-cam{
    width:100%;
    max-width:380px;
    margin:20px auto 0;
    padding:0 20px;
}

#login img.avatar{
    display:block;
    width:190px;
    max-width:70%;
    height:auto;
    margin:20px auto 10px;
    border-radius:50%;
}

#login .error-msg{
    width:100%;
    margin:0 0 12px;
    padding:8px 10px;
}

#login .login-error{
    margin:0;
    color:#dc3545;
    text-align:center;
    font-size:14px;
    line-height:1.4;
}

#login form{
    width:100%;
}

#login form label{
    display:block;
    margin:0 0 6px;
    color:#333;
    font-size:14px;
}

#login form input[type="text"],
#login form input[type="password"]{
    display:block;
    width:100%;
    height:44px;
    margin:0 0 16px;
    padding:10px 12px;
    color:#333;
    background:#fff;
    border:1px solid #d5d9df;
    border-radius:5px;
    outline:none;
    font-size:15px;
    line-height:22px;
    -webkit-appearance:none;
    appearance:none;
    transition:border-color .2s ease,box-shadow .2s ease;
}

#login form input[type="text"]:focus,
#login form input[type="password"]:focus{
    border-color:#337ab7;
    box-shadow:0 0 0 2px rgba(51,122,183,.12);
}

#login .submit{
    width:100%;
    margin:4px 0 0;
}

#login .submit input[type="submit"]{
    display:block;
    width:100%;
    min-height:44px;
    padding:10px 15px;
    color:#fff;
    background:#337ab7;
    border:1px solid #2e6da4;
    border-radius:5px;
    font-size:15px;
    font-weight:500;
    line-height:22px;
    cursor:pointer;
}

#login .submit input[type="submit"]:hover{
    background:#286090;
    border-color:#204d74;
}

#login .safe-hand-logo{
    display:block;
    width:250px;
    max-width:85%;
    height:auto;
    margin:25px auto 0;
}


/* =======================================================
   09. DASHBOARD / REPORTS
======================================================= */

/*
   Dashboard-specific styles should be added here.
   Existing dashboard classes must be preserved.

   Report / MIS-specific styles should also be added here.
   Do not create dashboard.css / report.css unless a module
   genuinely requires a separate library.
*/


/* =======================================================
   10. RESPONSIVE / MOBILE
======================================================= */

@media(max-width:991px){

    .table-responsive{
        overflow-x:auto;
    }
}

@media(max-width:768px){

    .footer-inner{
        flex-direction:column;
        justify-content:center;
        gap:6px;
        padding:12px 15px;
        text-align:center;
    }

    .footer-brand{
        align-items:center;
        min-width:0;
    }

    .footer-center{
        flex-wrap:wrap;
    }

    .footer-status{
        justify-content:center;
        min-width:0;
    }
}

@media(max-width:767px){

    #login .app-cam{
        max-width:360px;
        margin-top:15px;
        padding:0 18px;
    }

    #login img.avatar{
        width:170px;
        margin-top:15px;
    }

    #login form input[type="text"],
    #login form input[type="password"],
    #login .submit input[type="submit"]{
        min-height:44px;
    }
}

@media(max-width:480px){

    #login .app-cam{
        max-width:100%;
        margin-top:10px;
        padding:0 16px;
    }

    #login img.avatar{
        width:150px;
        max-width:65%;
        margin-top:10px;
    }

    #login form label{
        font-size:14px;
    }

    #login form input[type="text"],
    #login form input[type="password"]{
        height:46px;
        margin-bottom:14px;
        font-size:16px;
    }

    #login .submit input[type="submit"]{
        min-height:46px;
        font-size:15px;
    }

    #login .safe-hand-logo{
        width:220px;
        max-width:80%;
        margin-top:22px;
    }
}

@media(max-width:360px){

    #login .app-cam{
        padding:0 12px;
    }

    #login img.avatar{
        width:135px;
    }

    #login .safe-hand-logo{
        width:200px;
    }
}

