html,
body{
    overflow-x:hidden;
}

*{
    box-sizing:border-box;
}

body{
    font-family:Arial,sans-serif;
    margin:12px;
    padding:0;
    background:#f8fafc;
}

h1{
    margin-top:0;
}

img{
    max-width:100%;
    height:auto;
}

/* Forms */

input,
select,
textarea{
    width:100%;
    max-width:100%;
    padding:10px;
    border:1px solid #ddd;
    border-radius:8px;
    font-size:16px;
}

form p{
    font-weight:600;
    margin-bottom:8px;
}

button{
    padding:10px 15px;
    cursor:pointer;
    border:none;
    border-radius:8px;
}

button[type="submit"]{
    width:100%;
    background:#000881;
    color:white;
    font-size:16px;
    font-weight:600;
    padding:14px;
    border-radius:12px;
}

.required-star{
    color:red;
    font-weight:bold;
}

/* General Cards */

.section-card{
    background:#ffffff;
    border:1px solid #dfe3e8;
    border-radius:12px;
    padding:15px;
    margin-bottom:15px;
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.section-title{
    margin-top:0;
    padding-bottom:12px;
    border-bottom:1px solid #dfe3e8;
    margin-bottom:15px;
}

.welcome-box{
    background:#f1f5f9;
    padding:15px;
    border-radius:12px;
    margin-bottom:15px;
}

.success-message{
    background:#e8f8ea;
    color:#14833b;
    border:1px solid #b9e6c1;
    padding:12px;
    border-radius:10px;
    font-weight:600;
}

/* Page Header */

.page-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:15px;
    margin-bottom:20px;
}

.page-header h1{
    margin:0;
}

.client-subtitle{
    margin-top:8px;
    margin-bottom:20px;
    color:#666;
    font-size:16px;
}

.top-nav{
    text-align:right;
    margin-bottom:15px;
}

/* Buttons */

.dashboard-buttons{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
    margin-bottom:15px;
}

.dashboard-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    width:auto;

    background:#000881;
    color:#fff !important;

    text-decoration:none;

    padding:8px 16px;

    border-radius:8px;

    font-size:14px;
    font-weight:600;

    text-align:center;
}

.dashboard-btn:hover{
    opacity:0.9;
    color:#fff;
}

.dashboard-buttons .dashboard-btn{
    width:100%;
    padding:12px 10px;
    border-radius:10px;
    font-size:16px;
    font-weight:700;
}

.action-buttons{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.action-btn{
    display:flex;
    align-items:center;
    justify-content:center;

    width:100%;
    min-height:52px;

    background:#eef5ff;
    color:#000881 !important;

    text-decoration:none;

    border:1px solid #d8e7ff;
    border-radius:14px;

    font-size:18px;
    font-weight:600;

    transition:0.2s;
}

.action-btn:hover{
    background:#e3efff;
    transform:translateY(-2px);
}

.logout-btn{
    display:inline-block;
    background:#dc3545;
    color:white !important;
    text-decoration:none;
    padding:12px 20px;
    border-radius:8px;
    font-weight:600;
    margin-top:10px;
}

.logout-btn:hover{
    opacity:0.9;
}

/* Tables */

table{
    width:100%;
    border-collapse:collapse;
    overflow-x:auto;
    display:block;
    background:#fff;
}

table th,
table td{
    padding:10px;
}

/* Dashboard Stats */

.stats-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin:15px 0;
}

.stat-card{
    background:#ffffff;
    border-radius:14px;
    padding:15px 8px;
    text-align:center;
    box-shadow:0 3px 12px rgba(0,0,0,0.10);
    border:none;
    transition:0.2s;
}

.stat-card h3{
    margin:0 0 6px 0;
    font-size:12px;
    line-height:1.2;
}

.stat-card p{
    margin:8px 0 0;
    font-size:32px;
    font-weight:700;
}

.stat-card-link{
    text-decoration:none;
    color:inherit;
    display:block;
}

.stat-card-link:hover .stat-card{
    transform:translateY(-3px);
    box-shadow:0 6px 18px rgba(0,0,0,0.14);
}

/* Client Cards */

.client-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
}

.client-card{
    background:#ffffff;
    border:1px solid #dfe3e8;
    border-radius:12px;
    padding:12px;
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.client-card h3{
    margin:0 0 12px 0;
    font-size:16px;
}

.client-card p{
    margin:8px 0;
    font-size:13px;
}

.client-card a{
    display:inline-block;
    margin-top:10px;
    font-weight:bold;
}

.client-card .dashboard-btn{
    width:auto;
}

/* Client Details */

.info-box{
    background:#f8fbff;
    border:1px solid #dde9ff;
    border-radius:16px;
    overflow:hidden;
    margin-bottom:20px;
}

.info-title{
    margin:0;
    padding:15px 20px;
    background:#eef5ff;
    color:#000881;
    font-size:20px;
}

.detail-row{
    display:flex;
    justify-content:space-between;
    gap:15px;
    padding:14px 20px;
    border-bottom:1px solid #edf1f7;
}

.detail-row:last-child{
    border-bottom:none;
}

.detail-row span:first-child{
    font-weight:600;
}

.detail-row span:last-child{
    text-align:right;
}

/* Badges */

.badge{
    display:inline-block;
    padding:6px 12px;
    border-radius:20px;
    font-size:14px;
    font-weight:600;
}

.badge-blue{
    background:#e8f2ff;
    color:#0055cc;
}

.badge-green{
    background:#e8f8ea;
    color:#14833b;
}

.badge-orange{
    background:#fff4dd;
    color:#c67a00;
}

/* Notices */

.notice-box{
    background:#eef7ff;
    border:1px solid #d6ebff;
    border-radius:12px;
    padding:15px;
    margin-bottom:15px;
}

.notice-item{
    padding:15px;
    border-radius:12px;
    margin-top:10px;
}

.notice-info{
    background:#fff8cc;
    border:1px solid #f4e58a;
}

.notice-important{
    background:#ffe4e4;
    border:1px solid #ffb3b3;
}

.notice-urgent{
    background:#ffcfcf;
    border:1px solid #ff7b7b;
}

.notice-history-card{
    background:#ffffff;
    border-left:5px solid #000881;
    border-radius:12px;
    padding:15px;
    margin-bottom:15px;
    box-shadow:0 3px 10px rgba(0,0,0,0.10);
}

.active-notice-card{
    background:#ffffff;
    border-left:5px solid #007003;
    border-radius:12px;
    padding:15px;
    margin-bottom:15px;
    box-shadow:0 3px 10px rgba(0,0,0,0.10);
}

.notice-btn{
    display:inline-block;
    background:#000881;
    color:#fff;
    text-decoration:none;
    padding:8px 14px;
    border-radius:8px;
    margin-right:8px;
    font-size:14px;
}

.notice-btn:hover{
    opacity:0.9;
}

.notice-btn-green{
    background:#007003;
}

.notice-btn-red{
    background:#c62828;
}

/* Activity */

.activity-card{
    background:#ffffff;
    border:1px solid #dfe3e8;
    border-radius:12px;
    padding:18px;
    margin-bottom:12px;
}

.activity-card h3{
    margin-top:0;
    margin-bottom:12px;
    padding-bottom:10px;
    border-bottom:1px solid #e5e7eb;
}

.activity-card p{
    margin:10px 0;
}

.activity-card small{
    color:#666;
}

/* Followups */

.followup-item{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    border-radius:10px;
    padding:10px;
    margin-bottom:8px;
}

.followup-card{
    background:#ffffff;
    border:1px solid #dfe3e8;
    border-radius:14px;
    padding:15px;
    margin-bottom:15px;
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.followup-card-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
    padding-bottom:12px;
    border-bottom:1px solid #edf1f7;
}

.followup-card-header h3{
    margin:0;
    font-size:18px;
}

.followup-actions{
    margin-top:15px;
}

.completed-text{
    display:inline-block;
    color:#14833b;
    font-weight:700;
    padding:8px 0;
}

/* Notification Sidebar */

#notificationTab{
    position:fixed;

    right:0;
    top:50%;

    transform:translateY(-50%);

    width:60px;
    height:90px;

    background:#000881;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:12px 0 0 12px;

    cursor:pointer;

    z-index:9999;

    font-size:28px;

    transition:transform 0.3s ease;
}

#notificationTab.open{
    transform:
        translateY(-50%)
        translateX(calc(-1 * min(85vw, 420px)));
}

#notificationBadge{
    position:absolute;

    top:6px;
    right:6px;

    background:red;
    color:white;

    min-width:24px;
    height:24px;

    padding:0 6px;

    border-radius:999px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:12px;
    font-weight:bold;

    z-index:10000;
}

#notificationOverlay{
    position:fixed;

    inset:0;

    background:rgba(0,0,0,0.25);

    backdrop-filter:blur(4px);

    display:none;

    z-index:9997;
}

#notificationOverlay.open{
    display:block;
}



#notificationSidebar{
    visibility:hidden;

    position:fixed;

    top:0;
    right:0;

    width:85%;
    max-width:420px;
    height:100vh;

    background:white;

    overflow-y:auto;

    transform:translateX(100%);

    transition:
        transform 0.3s ease,
        visibility 0s linear 0.3s;

    z-index:9998;

    box-shadow:-5px 0 25px rgba(0,0,0,0.15);

    padding:20px;
}



#notificationSidebar.open{
    visibility:visible;
    transform:translateX(0);

    transition:
        transform 0.3s ease,
        visibility 0s;
}
#notificationSidebar.open{
    visibility:visible;
    opacity:1;
    transform:translateX(0);

    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        visibility 0s;
}

#notificationSidebar.open{
    visibility:visible;
    transform:translateX(0);
}

.notification-item{
    display:block;

    text-decoration:none;

    color:#111;

    padding:15px;

    margin-bottom:12px;

    border:1px solid #e5e7eb;

    border-radius:12px;

    background:#fafafa;
}

.notification-item:hover{
    background:#f3f4f6;
}

.notification-item.unread{
    font-weight:700;
    background:#eef5ff;
    border-color:#bfd8ff;
}

.notification-item.read{
    font-weight:400;
    background:#fafafa;
}

.view-all-btn{
    display:block;

    text-align:center;

    margin-top:15px;

    padding:12px;

    background:#000881;

    color:white !important;

    text-decoration:none;

    border-radius:10px;
}

/* Login Page */

.login-page{
    min-height:100vh;
    margin:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f1f5f9;
}

.login-wrapper{
    width:100%;
    padding:20px;
}

.login-card{
    background:#ffffff;
    border:1px solid #dfe3e8;
    border-radius:18px;
    padding:25px;
    max-width:420px;
    margin:0 auto;
    box-shadow:0 8px 25px rgba(0,0,0,0.12);
}

.login-card h1{
    margin-bottom:8px;
    color:#000;
}

.login-card form p{
    font-weight:600;
    margin-bottom:8px;
}

.login-error{
    background:#ffe4e4;
    color:#c62828;
    border:1px solid #ffb3b3;
    padding:12px;
    border-radius:10px;
    margin-bottom:15px;
    font-weight:600;
}

/* Mobile */

@media (max-width:768px){

    body{
        margin:10px;
    }

    h1{
        font-size:24px;
    }

    h2{
        font-size:20px;
    }

    table{
        font-size:14px;
    }

    .stats-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:8px;
    }

    .stat-card{
        padding:10px 5px;
    }

    .stat-card h3{
        font-size:11px;
    }

    .stat-card p{
        font-size:20px;
    }

    .client-grid{
        grid-template-columns:repeat(2,1fr);
    }

    .dashboard-buttons{
        grid-template-columns:repeat(2,1fr);
    }
}

.table-wrapper{
    width:100%;
    overflow-x:auto;
}

.clean-table{
    width:100%;
    min-width:430px;
    border-collapse:collapse;
    background:#ffffff;
    display:table;
    table-layout:auto;
}

.clean-table th{
    background:#eef5ff;
    color:#000881;
    text-align:left;
    padding:6px 4px;
    font-size:12px;
    border-bottom:1px solid #dfe3e8;
}

.clean-table td{
    padding:6px 4px;
    font-size:12px;
    border-bottom:1px solid #edf1f7;
    vertical-align:middle;
}


.small-btn{
    display:inline-block;
    background:#000881;
    color:white !important;
    text-decoration:none;
    padding:4px 6px;
    border-radius:5px;
    font-size:10px;
    font-weight:600;
    margin-right:1px;
}

.small-btn-red{
    background:#dc3545;
}

.clean-table th,
.clean-table td{
    white-space:nowrap;
}

.table-actions{
    display:flex;
    gap:2px;
    white-space:nowrap;
}



.admins-table{
    min-width:620px;
}

.admins-table th,
.admins-table td{
    white-space:nowrap;
}

.filter-form{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    margin-bottom:18px;
}

.filter-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.reset-btn{
    display:flex;
    align-items:center;
    justify-content:center;

    background:#eef5ff;
    color:#000881 !important;

    text-decoration:none;

    border:1px solid #d8e7ff;
    border-radius:12px;

    font-size:16px;
    font-weight:600;
}

.clients-table{
    min-width:850px;
}

.clients-table th,
.clients-table td{
    white-space:nowrap;
}

.table-client-link{
    color:#000881;
    font-weight:700;
    text-decoration:none;
}

.table-client-link:hover{
    text-decoration:underline;
}

.health-good{
    color:#14833b;
    font-weight:700;
}

.health-warning{
    color:#c67a00;
    font-weight:700;
}

.health-critical{
    color:#c62828;
    font-weight:700;
}

.health-none{
    color:#666;
    font-weight:700;
}