/*==================================================
 MILEN ARCHITECTS
 Invoice Management System
===================================================*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root{

--primary:#1F3A63;
--primary-dark:#17304f;
--secondary:#3B82F6;
--success:#10B981;
--warning:#F59E0B;
--danger:#EF4444;
--purple:#7C3AED;

--white:#ffffff;
--light:#f4f7fb;
--border:#e5e7eb;
--text:#1f2937;
--muted:#6b7280;

--shadow:0 8px 30px rgba(0,0,0,.08);

--radius:18px;

}

*{
margin:0;
padding:0;
box-sizing:border-box;
}

html{
scroll-behavior:smooth;
}

body{

font-family:'Poppins',sans-serif;
background:var(--light);
color:var(--text);

}

a{
text-decoration:none;
color:inherit;
}

img{
max-width:100%;
display:block;
}

ul{
list-style:none;
}

.wrapper{

display:flex;
min-height:100vh;

}






/*==========================================
SIDEBAR
==========================================*/

.sidebar{

width:260px;
background:var(--primary);
color:#fff;
position:fixed;
left:0;
top:0;
bottom:0;

display:flex;
flex-direction:column;

box-shadow:5px 0 20px rgba(0,0,0,.08);

}

.logo{

padding:35px 25px;
text-align:center;
border-bottom:1px solid rgba(255,255,255,.08);

}

.logo img{

width:85px;
margin:auto;
margin-bottom:15px;

}

.logo h2{

font-size:34px;
font-weight:800;
letter-spacing:2px;

}

.logo span{

font-size:14px;
opacity:.8;

}





.menu{

flex:1;
padding:25px 0;

}

.menu li{

margin:6px 15px;

}

.menu a{

display:flex;
align-items:center;
gap:15px;

padding:15px 20px;

border-radius:12px;

transition:.3s;

font-size:15px;
font-weight:500;

}

.menu a i{

width:24px;
font-size:18px;

}

.menu a:hover{

background:rgba(255,255,255,.12);

transform:translateX(5px);

}

.menu .active a{

background:#ffffff;
color:var(--primary);

}

.logout{

margin-top:auto;
padding-bottom:20px;

}





/*==========================================
MAIN
==========================================*/

.main{

margin-left:260px;

flex:1;

display:flex;

flex-direction:column;

}





/*==========================================
TOPBAR
==========================================*/

.topbar{

height:90px;

background:#fff;

padding:0 35px;

display:flex;

align-items:center;

justify-content:space-between;

box-shadow:var(--shadow);

}

.topbar .left h2{

font-size:34px;
font-weight:700;

}

.topbar .left p{

margin-top:4px;
font-size:14px;
color:var(--muted);

}

.right{

display:flex;

align-items:center;

gap:20px;

}

.search{

display:flex;
align-items:center;

background:#f4f7fb;

padding:10px 18px;

border-radius:12px;

width:280px;

}

.search input{

border:none;

outline:none;

background:none;

width:100%;

margin-left:10px;

font-size:15px;

}

.new-btn{

background:var(--secondary);

color:#fff;

padding:12px 18px;

border-radius:12px;

font-weight:600;

transition:.3s;

}

.new-btn:hover{

background:#2563eb;

}

.notification{

position:relative;

font-size:22px;

cursor:pointer;

}

.notification span{

position:absolute;

right:-8px;

top:-8px;

background:red;

color:#fff;

font-size:11px;

width:18px;

height:18px;

border-radius:50%;

display:flex;

align-items:center;

justify-content:center;

}

.profile{

display:flex;

align-items:center;

gap:12px;

}

.profile i{

font-size:42px;

color:var(--primary);

}

.profile strong{

display:block;

font-size:15px;

}

.profile small{

color:var(--muted);

}
/*==========================================
CONTENT
==========================================*/

.content{
    padding:35px;
}

.page-header{
    margin-bottom:30px;
}

.page-header h1{
    font-size:42px;
    font-weight:700;
    color:#1f2937;
}

.page-header p{
    color:#6b7280;
    margin-top:8px;
}


/*==========================================
STATISTICS GRID
==========================================*/

.stats-grid{

display:grid;

grid-template-columns:repeat(4,1fr);

gap:25px;

margin-bottom:35px;

}

.stat-card{

background:#fff;

border-radius:18px;

padding:28px;

display:flex;

align-items:center;

gap:18px;

box-shadow:0 8px 30px rgba(0,0,0,.08);

transition:.3s;

}

.stat-card:hover{

transform:translateY(-6px);

}

.stat-icon{

width:70px;

height:70px;

display:flex;

justify-content:center;

align-items:center;

border-radius:18px;

font-size:28px;

color:#fff;

}

.blue .stat-icon{
background:#2563eb;
}

.green .stat-icon{
background:#10b981;
}

.orange .stat-icon{
background:#f59e0b;
}

.purple .stat-icon{
background:#7c3aed;
}

.stat-info h5{

font-size:15px;

color:#6b7280;

margin-bottom:8px;

}

.stat-info h2{

font-size:34px;

font-weight:700;

margin-bottom:6px;

}

.stat-info span{

color:#9ca3af;

font-size:14px;

}


/*==========================================
TABLE CARDS
==========================================*/

.table-card{

background:#fff;

border-radius:18px;

box-shadow:0 8px 30px rgba(0,0,0,.08);

padding:25px;

margin-bottom:30px;

}

.table-card h2{

margin-bottom:20px;

font-size:24px;

}


/*==========================================
TABLE
==========================================*/

.table{

width:100%;

border-collapse:collapse;

}

.table thead{

background:#1f3a63;

color:#fff;

}

.table th{

padding:16px;

text-align:left;

font-size:14px;

font-weight:600;

}

.table td{

padding:16px;

border-bottom:1px solid #eee;

font-size:14px;

}

.table tbody tr:hover{

background:#f8fafc;

}


/*==========================================
STATUS BADGES
==========================================*/

.badge{

display:inline-block;

padding:6px 14px;

border-radius:50px;

font-size:12px;

font-weight:600;

}

.badge.pending{

background:#fff7e6;

color:#d97706;

}

.badge.paid{

background:#ecfdf5;

color:#16a34a;

}

.badge.overdue{

background:#fee2e2;

color:#dc2626;

}


/*==========================================
RESPONSIVE
==========================================*/

@media(max-width:1200px){

.stats-grid{

grid-template-columns:repeat(2,1fr);

}

}

@media(max-width:768px){

.sidebar{

width:80px;

}

.main{

margin-left:80px;

}

.logo h2,
.logo span,
.menu span{

display:none;

}

.topbar{

padding:20px;

}

.search{

display:none;

}

.stats-grid{

grid-template-columns:1fr;

}

.table{

display:block;

overflow-x:auto;

}

}
/* ===============================
   CLIENTS MODULE
================================= */

.page-header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:25px;
}

.page-header h1{
font-size:30px;
font-weight:700;
color:#1f2937;
}

.page-header p{
color:#6b7280;
margin-top:5px;
}

.btn-primary{
display:inline-flex;
align-items:center;
gap:8px;
padding:12px 20px;
background:#2563eb;
color:#fff;
border-radius:10px;
text-decoration:none;
font-weight:600;
transition:.3s;
}

.btn-primary:hover{
background:#1d4ed8;
}

.table-card{
background:#fff;
padding:25px;
border-radius:18px;
box-shadow:0 8px 30px rgba(0,0,0,.06);
overflow-x:auto;
}

.table{
width:100%;
border-collapse:collapse;
}

.table th{
background:#23395d;
color:#fff;
padding:15px;
font-weight:600;
text-align:left;
}

.table td{
padding:15px;
border-bottom:1px solid #edf2f7;
}

.table tr:hover{
background:#f8fafc;
}

.btn-view,
.btn-edit,
.btn-delete{
display:inline-flex;
align-items:center;
justify-content:center;
width:38px;
height:38px;
border-radius:8px;
color:#fff;
text-decoration:none;
margin-right:6px;
transition:.3s;
}

.btn-view{
background:#2563eb;
}

.btn-edit{
background:#f59e0b;
}

.btn-delete{
background:#dc2626;
}

.btn-view:hover,
.btn-edit:hover,
.btn-delete:hover{
transform:translateY(-2px);
}
/*==========================================
CLIENT FORM
==========================================*/

.form-card{

background:#fff;

padding:30px;

border-radius:18px;

box-shadow:var(--shadow);

}

.form-grid{

display:grid;

grid-template-columns:repeat(2,1fr);

gap:25px;

}

.form-group{

display:flex;

flex-direction:column;

}

.form-group label{

margin-bottom:8px;

font-weight:600;

color:#374151;

}

.form-group input,
.form-group textarea{

padding:14px;

border:1px solid #d1d5db;

border-radius:10px;

font-size:15px;

outline:none;

transition:.3s;

}

.form-group input:focus,
.form-group textarea:focus{

border-color:#2563eb;

box-shadow:0 0 0 3px rgba(37,99,235,.15);

}

.form-group.full{

grid-column:1 / -1;

}

.form-actions{

display:flex;

justify-content:flex-end;

gap:15px;

margin-top:30px;

}

.btn-secondary{

background:#6b7280;

color:white;

padding:12px 24px;

border-radius:10px;

text-decoration:none;

}

.btn-secondary:hover{

background:#4b5563;

}
.success-message{

background:#dcfce7;

color:#166534;

padding:16px 20px;

border-radius:12px;

margin-bottom:25px;

font-weight:600;

display:flex;

align-items:center;

gap:10px;

border-left:5px solid #22c55e;

}
.profile-table{
    width:100%;
    border-collapse:collapse;
}

.profile-table th{
    width:220px;
    text-align:left;
    background:#f7f9fc;
    padding:16px;
    border-bottom:1px solid #eee;
}

.profile-table td{
    padding:16px;
    border-bottom:1px solid #eee;
}
.btn-primary,
.btn-secondary{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 22px;
    border-radius:10px;
    text-decoration:none;
    font-weight:600;
    transition:.3s;
}

.btn-primary{
    background:#2f6fed;
    color:#fff;
}

.btn-primary:hover{
    background:#1d56d8;
}

.btn-secondary{
    background:#eef3fa;
    color:#23395d;
}

.btn-secondary:hover{
    background:#dfe8f7;
}
.header-actions{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
}
.btn-primary,
.btn-secondary{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 20px;
    border-radius:8px;
    text-decoration:none;
    font-weight:600;
}

.btn-primary{
    background:#2f6fed;
    color:#fff;
}

.btn-primary:hover{
    background:#1d56d8;
}

.btn-secondary{
    background:#eef3fa;
    color:#23395d;
}
.badge-success{
    background:#d1fae5;
    color:#065f46;
    padding:6px 12px;
    border-radius:30px;
    font-size:13px;
    font-weight:600;
}

.badge-warning{
    background:#fef3c7;
    color:#92400e;
    padding:6px 12px;
    border-radius:30px;
    font-size:13px;
    font-weight:600;
}

.badge-danger{
    background:#fee2e2;
    color:#991b1b;
    padding:6px 12px;
    border-radius:30px;
    font-size:13px;
    font-weight:600;
}

.badge-secondary{
    background:#e5e7eb;
    color:#374151;
    padding:6px 12px;
    border-radius:30px;
    font-size:13px;
    font-weight:600;
}
.btn-primary,
.btn-secondary{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:12px 20px;
    border-radius:8px;
    text-decoration:none;
    font-weight:600;
}

.btn-primary{
    background:#2f6fed;
    color:#fff;
}

.btn-primary:hover{
    background:#1d56d8;
}

.btn-secondary{
    background:#eef3fa;
    color:#23395d;
}
.summary-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

#invoiceTable input{
    width:100%;
}

#invoiceTable .btn-delete{
    width:40px;
    height:40px;
}

.form-card input,
.table-card input,
.table-card select,
.table-card textarea{

    width:100%;
    padding:12px;
    border:1px solid #d8dee8;
    border-radius:8px;
    font-size:15px;
    box-sizing:border-box;

}

.form-group label{

    display:block;
    margin-bottom:8px;
    font-weight:600;

}
/* ===========================
   FORM CONTROLS
=========================== */

.form-group{
    display:flex;
    flex-direction:column;
    margin-bottom:18px;
}

.form-group label{
    font-weight:600;
    margin-bottom:8px;
    color:#2d3748;
}

.form-group input,
.form-group select,
.form-group textarea{

    width:100%;
    padding:12px 14px;

    border:1px solid #d8dee8;
    border-radius:8px;

    font-size:15px;
    font-family:inherit;

    background:#fff;

    transition:.2s;

    box-sizing:border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{

    border-color:#2563eb;
    outline:none;
    box-shadow:0 0 0 3px rgba(37,99,235,.15);

}

.btn-primary{

    background:#2563eb;
    color:#fff;

    padding:12px 26px;

    border:none;

    border-radius:8px;

    cursor:pointer;

    font-weight:600;

    font-size:15px;

}

.btn-primary:hover{

    background:#1d4ed8;

}

.btn-secondary{

    background:#eef2f7;

    color:#2d3748;

    padding:12px 26px;

    border-radius:8px;

    text-decoration:none;

}

.summary-grid{

    display:grid;

    grid-template-columns:repeat(4,1fr);

    gap:20px;

}

.invoice-grid{

    display:grid;

    grid-template-columns:2fr 1fr;

    gap:25px;

}

@media(max-width:900px){

.summary-grid{

grid-template-columns:1fr;

}

.invoice-grid{

grid-template-columns:1fr;

}

}
/*==========================================
INVOICE PAGE
==========================================*/

.invoice-grid{

display:grid;

grid-template-columns:1fr 1fr;

gap:25px;

margin-bottom:25px;

}

.summary-grid{

display:grid;

grid-template-columns:repeat(4,1fr);

gap:20px;

}

#invoiceTable input{

width:100%;

padding:10px;

border:1px solid #d8dee8;

border-radius:8px;

box-sizing:border-box;

}

#invoiceTable .btn-delete{

width:40px;

height:40px;

border:none;

border-radius:8px;

background:#ef4444;

color:#fff;

cursor:pointer;

}

#invoiceTable .btn-delete:hover{

background:#dc2626;

}

@media(max-width:900px){

.invoice-grid{

grid-template-columns:1fr;

}

.summary-grid{

grid-template-columns:1fr;

}

}
/* Shared layout classes introduced by the core refactor. */
.login-page { min-height:100vh; display:grid; place-items:center; padding:24px; }
.login-card { width:100%; max-width:420px; background:var(--white); padding:32px; border-radius:var(--radius); box-shadow:var(--shadow); }
.login-card > p { color:var(--muted); margin:8px 0 24px; }
.login-card .form-group { margin-top:16px; }
.login-card .form-actions button { width:100%; justify-content:center; border:0; cursor:pointer; }
.alert, .error-message { padding:16px; margin-bottom:20px; border-radius:8px; }
.alert-success { background:#d1fae5; color:#065f46; }
.alert-danger, .error-message { background:#fee2e2; color:#991b1b; }
.alert-info { background:#dbeafe; color:#1e40af; }
.brand { padding:24px; text-align:center; }
.brand .logo { width:100px; padding:0; border:0; margin:0 auto 12px; }
.menu a.active { background:white; color:var(--primary); }
.sidebar-footer { padding:20px; }
.sidebar-footer .user { display:flex; gap:12px; margin-bottom:16px; }
.sidebar-footer small { display:block; }
.sidebar-footer .logout { color:inherit; background:transparent; border:0; font:inherit; cursor:pointer; }
.breadcrumbs ul { display:flex; gap:12px; font-size:12px; }
.badge-draft { background:#e5e7eb; color:#374151; }
.badge-partial, .badge-info { background:#dbeafe; color:#1e40af; }
.badge-overdue { background:#fee2e2; color:#991b1b; }
@media (max-width:768px) { .brand h2, .brand span, .sidebar-footer .user, .profile, .notification { display:none; } .brand, .sidebar-footer { padding:12px; } .topbar { height:auto; flex-wrap:wrap; gap:12px; } .content { padding:16px; } }
@media print { .sidebar, .topbar, .breadcrumbs { display:none; } .main { margin:0; } .content { padding:0; } .table-card { box-shadow:none; } }

/* Allow shared content to shrink inside the narrow sidebar layout. */
.main { min-width:0; }
.page-header { flex-wrap:wrap; gap:16px; }
.topbar .right { flex-wrap:wrap; }

.company-identity { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; }
.company-identity img { width:110px; height:auto; }
.company-identity > div { text-align:right; overflow-wrap:anywhere; }
@media(max-width:600px) { .company-identity { flex-direction:column; } .company-identity > div { text-align:left; } }
@media print { .company-identity { break-inside:avoid; box-shadow:none; } }
