/* ============================================
   GREY HAWKS MEDIA - Main Stylesheet
   Sky Blue + Black + White | Poppins font
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --sky: #00AEEF;
    --sky-dark: #0090C8;
    --sky-light: #E6F7FD;
    --sky-mid: #B3E5F7;
    --black: #0D0D0D;
    --gray-dark: #2C2C2C;
    --gray-mid: #6B6B6B;
    --gray-light: #F4F4F4;
    --white: #FFFFFF;
    --border: #E2E2E2;
    --danger: #E53935;
    --warning: #F59E0B;
    --success: #10B981;
    --purple: #7C3AED;
    --sidebar-w: 240px;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.07);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gray-light);
    color: var(--black);
    font-size: 14px;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--black);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: invert(1) brightness(2);
}

.sidebar-logo span {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
}

.sidebar-logo small {
    display: block;
    font-size: 10px;
    color: var(--sky);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.sidebar-section {
    padding: 16px 12px 4px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    font-weight: 400;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--sky);
    color: var(--white);
}

.sidebar nav a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-bottom {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
}

.sidebar-user .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sky);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--white);
    flex-shrink: 0;
}

.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .role { font-size: 10px; color: rgba(255,255,255,0.4); text-transform: capitalize; }

/* ---- MAIN LAYOUT ---- */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-title small { display: block; font-size: 11px; color: var(--gray-mid); font-weight: 400; }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-mid);
    font-size: 20px;
    padding: 4px;
}

.notif-badge {
    position: absolute;
    top: 0; right: 0;
    background: var(--danger);
    color: white;
    font-size: 9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content { padding: 28px; }

/* ---- CARDS ---- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.card-title { font-size: 15px; font-weight: 600; }

/* ---- STAT CARDS ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue   { background: var(--sky-light); color: var(--sky-dark); }
.stat-icon.black  { background: #F0F0F0; color: var(--black); }
.stat-icon.green  { background: #ECFDF5; color: var(--success); }
.stat-icon.orange { background: #FFF7ED; color: var(--warning); }
.stat-icon.red    { background: #FEF2F2; color: var(--danger); }
.stat-icon.purple { background: #F5F3FF; color: var(--purple); }

.stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 12px; color: var(--gray-mid); margin-top: 2px; }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--gray-light);
    color: var(--gray-mid);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--sky-light); }

/* ---- BADGES ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.badge-gray   { background: #F0F0F0;  color: #555; }
.badge-blue   { background: #EFF8FF;  color: #1D6FA4; }
.badge-green  { background: #ECFDF5;  color: #065F46; }
.badge-teal   { background: #E6FFFA;  color: #0F766E; }
.badge-amber  { background: #FFFBEB;  color: #92400E; }
.badge-orange { background: #FFF7ED;  color: #9A3412; }
.badge-red    { background: #FEF2F2;  color: #991B1B; }
.badge-purple { background: #F5F3FF;  color: #5B21B6; }

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary   { background: var(--sky);     color: var(--white); }
.btn-primary:hover { background: var(--sky-dark); }
.btn-dark      { background: var(--black);   color: var(--white); }
.btn-dark:hover { background: var(--gray-dark); }
.btn-outline   { background: transparent; border: 1.5px solid var(--border); color: var(--gray-dark); }
.btn-outline:hover { border-color: var(--sky); color: var(--sky); }
.btn-danger    { background: var(--danger);  color: var(--white); }
.btn-success   { background: var(--success); color: var(--white); }
.btn-sm        { padding: 5px 12px; font-size: 12px; }
.btn-icon      { padding: 7px; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }

label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

input[type=text], input[type=email], input[type=password],
input[type=date], input[type=number], input[type=tel],
select, textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: var(--black);
    background: var(--white);
    transition: border-color 0.2s;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--sky);
}

textarea { resize: vertical; min-height: 90px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}

/* ---- PRIORITY DOTS ---- */
.priority-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}
.priority-dot.low    { background: var(--success); }
.priority-dot.medium { background: var(--warning); }
.priority-dot.high   { background: #F97316; }
.priority-dot.urgent { background: var(--danger); }

/* ---- ALERTS ---- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #ECFDF5; color: #065F46; border-left: 3px solid var(--success); }
.alert-danger  { background: #FEF2F2; color: #991B1B; border-left: 3px solid var(--danger); }
.alert-info    { background: var(--sky-light); color: #1D6FA4; border-left: 3px solid var(--sky); }

/* ---- TABS ---- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab-btn {
    padding: 10px 18px;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-mid);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab-btn.active, .tab-btn:hover {
    color: var(--sky);
    border-bottom-color: var(--sky);
}

/* ---- PROGRESS BAR ---- */
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--sky); border-radius: 3px; transition: width 0.3s; }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-mid);
}
.empty-state i { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ---- MODAL ---- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white);
    border-radius: 14px;
    padding: 28px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gray-mid);
    line-height: 1;
}

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--black);
}
.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--sky);
    position: relative;
    overflow: hidden;
}
.login-left::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -100px; right: -100px;
}
.login-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: rgba(0,0,0,0.08);
    border-radius: 50%;
    bottom: -80px; left: -80px;
}
.login-left img {
    width: 120px;
    filter: invert(1) brightness(10);
    margin-bottom: 20px;
    position: relative; z-index: 1;
}
.login-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    position: relative; z-index: 1;
}
.login-left p {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin-top: 8px;
    text-align: center;
    position: relative; z-index: 1;
}
.login-right {
    width: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
}
.login-right h2 { font-size: 22px; font-weight: 600; color: var(--white); margin-bottom: 6px; }
.login-right p { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 28px; }
.login-right label { color: rgba(255,255,255,0.7); }
.login-right input {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.12);
    color: var(--white);
}
.login-right input:focus { border-color: var(--sky); }
.login-right input::placeholder { color: rgba(255,255,255,0.3); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .login-left { display: none; }
    .login-right { width: 100%; }
}

/* ---- UTILITY ---- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--gray-mid); }
.text-sm { font-size: 12px; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.w-100 { width: 100%; }
.hidden { display: none; }
