/* ============================================
   GST Office Manager - Vuexy Style Design System
   ============================================ */

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

:root {
    --primary: #7367f0;
    --primary-light: #8f85f3;
    --primary-dark: #5e50ee;
    --success: #28c76f;
    --success-light: #48da89;
    --warning: #ff9f43;
    --warning-light: #ffb976;
    --danger: #ea5455;
    --danger-light: #f08182;
    --info: #00cfe8;
    --info-light: #1ce7ff;
    --bg-body: #f8f8f8;
    --bg-card: #ffffff;
    --sidebar-bg: #283046;
    --sidebar-dark: #10163a;
    --text-primary: #636578;
    --text-heading: #5e5873;
    --text-muted: #b9b9c3;
    --text-white: #ffffff;
    --border-color: #ebe9f1;
    --shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
    --shadow-sm: 0 2px 8px rgba(34,41,47,0.08);
    --radius: 0.428rem;
    --radius-lg: 0.6rem;
    --sidebar-width: 260px;
    --navbar-height: 62px;
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { color: var(--text-heading); font-weight: 600; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ---- SIDEBAR ---- */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--sidebar-dark) 0%, var(--sidebar-bg) 100%);
    z-index: 1040;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.sidebar-brand {
    padding: 1.2rem 1.5rem;
    display: flex; align-items: center; gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .brand-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: #fff; font-weight: 700;
}
.sidebar-brand .brand-text {
    font-size: 1.1rem; font-weight: 700; color: var(--text-white);
    letter-spacing: 0.5px;
}

.sidebar-menu { padding: 0.75rem 0; list-style: none; margin: 0; }
.sidebar-menu .menu-header {
    padding: 1.2rem 1.5rem 0.4rem;
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.2px;
    color: rgba(255,255,255,0.3); font-weight: 600;
}
.sidebar-menu .menu-item { position: relative; }
.sidebar-menu .menu-item a {
    display: flex; align-items: center; gap: 0.85rem;
    padding: 0.65rem 1.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem; font-weight: 400;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-menu .menu-item a:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-white);
}
.sidebar-menu .menu-item.active a {
    color: var(--text-white);
    background: linear-gradient(118deg, var(--primary), rgba(115,103,240,0.7));
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-right: 0.8rem;
    box-shadow: 0 0 10px 1px rgba(115,103,240,0.7);
    border-left: 3px solid transparent;
}
.sidebar-menu .menu-item a i { font-size: 1.15rem; min-width: 20px; text-align: center; }
.sidebar-menu .menu-item .badge-sidebar {
    margin-left: auto;
    font-size: 0.65rem; padding: 0.2em 0.5em;
}

/* ---- MAIN CONTENT ---- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ---- TOP NAVBAR ---- */
.top-navbar {
    height: var(--navbar-height);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky; top: 0; z-index: 1030;
}
.top-navbar .navbar-search {
    position: relative; width: 280px;
}
.top-navbar .navbar-search input {
    width: 100%; padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 50px; font-size: 0.85rem;
    background: var(--bg-body);
    transition: var(--transition);
}
.top-navbar .navbar-search input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(115,103,240,0.15);
}
.top-navbar .navbar-search i {
    position: absolute; left: 0.9rem; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
}
.top-navbar .navbar-right {
    display: flex; align-items: center; gap: 1rem;
}
.top-navbar .user-dropdown {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
}
.top-navbar .user-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: 0.9rem;
}
.top-navbar .sidebar-toggle {
    display: none; background: none; border: none;
    font-size: 1.3rem; color: var(--text-heading); cursor: pointer;
}

/* ---- PAGE CONTENT ---- */
.page-content { padding: 1.5rem; }
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 0.75rem;
}
.page-header h4 { margin: 0; font-size: 1.3rem; }
.breadcrumb-custom {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.8rem; color: var(--text-muted); margin: 0;
}
.breadcrumb-custom a { color: var(--primary); }
.breadcrumb-custom .sep { margin: 0 0.2rem; }

/* ---- CARDS ---- */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600; color: var(--text-heading);
}
.card-body { padding: 1.25rem; }

/* ---- STAT CARDS ---- */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    transition: var(--transition);
    cursor: default;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}
.stat-card .stat-info h3 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.stat-card .stat-info p { margin: 0; font-size: 0.78rem; color: var(--text-muted); }

.stat-primary .stat-icon { background: rgba(115,103,240,0.12); color: var(--primary); }
.stat-success .stat-icon { background: rgba(40,199,111,0.12); color: var(--success); }
.stat-warning .stat-icon { background: rgba(255,159,67,0.12); color: var(--warning); }
.stat-danger .stat-icon { background: rgba(234,84,85,0.12); color: var(--danger); }
.stat-info .stat-icon { background: rgba(0,207,232,0.12); color: var(--info); }

/* ---- BUTTONS ---- */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none; color: #fff; border-radius: var(--radius);
    padding: 0.55rem 1.25rem; font-weight: 500; font-size: 0.85rem;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(115,103,240,0.4);
}
.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(115,103,240,0.5);
    color: #fff;
}
.btn-outline-primary-custom {
    border: 1px solid var(--primary); color: var(--primary);
    background: transparent; border-radius: var(--radius);
    padding: 0.55rem 1.25rem; font-weight: 500; font-size: 0.85rem;
    transition: var(--transition);
}
.btn-outline-primary-custom:hover {
    background: var(--primary); color: #fff;
}
.btn-success-custom {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    border: none; color: #fff; border-radius: var(--radius);
    padding: 0.55rem 1.25rem; font-weight: 500;
    box-shadow: 0 4px 12px rgba(40,199,111,0.4);
}
.btn-danger-custom {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    border: none; color: #fff; border-radius: var(--radius);
    padding: 0.55rem 1.25rem; font-weight: 500;
    box-shadow: 0 4px 12px rgba(234,84,85,0.3);
}

/* ---- TABLES ---- */
.table-custom { width: 100%; border-collapse: collapse; }
.table-custom thead th {
    background: var(--bg-body); color: var(--text-heading);
    font-weight: 600; font-size: 0.8rem; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--border-color);
}
.table-custom tbody td {
    padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem; vertical-align: middle;
}
.table-custom tbody tr:hover { background: rgba(115,103,240,0.03); }
.table-custom tbody tr:last-child td { border-bottom: none; }

/* ---- BADGES ---- */
.badge-light-primary { background: rgba(115,103,240,0.12); color: var(--primary); font-weight: 500; }
.badge-light-success { background: rgba(40,199,111,0.12); color: var(--success); font-weight: 500; }
.badge-light-warning { background: rgba(255,159,67,0.12); color: var(--warning); font-weight: 500; }
.badge-light-danger { background: rgba(234,84,85,0.12); color: var(--danger); font-weight: 500; }
.badge-light-info { background: rgba(0,207,232,0.12); color: var(--info); font-weight: 500; }
.badge-light-secondary { background: rgba(108,117,125,0.12); color: #6c757d; font-weight: 500; }

/* ---- FORMS ---- */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(115,103,240,0.1);
}
.form-label { font-weight: 500; color: var(--text-heading); font-size: 0.85rem; margin-bottom: 0.35rem; }

/* ---- TABS (Client Profile) ---- */
.nav-tabs-custom { border-bottom: 2px solid var(--border-color); }
.nav-tabs-custom .nav-link {
    border: none; color: var(--text-muted);
    font-weight: 500; padding: 0.75rem 1.25rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: var(--transition);
}
.nav-tabs-custom .nav-link:hover { color: var(--primary); }
.nav-tabs-custom .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
}

/* ---- ALERT / FLASH ---- */
.alert-custom {
    border: none; border-radius: var(--radius);
    padding: 0.85rem 1.25rem;
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.875rem; animation: slideDown 0.3s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ---- TIMELINE ---- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: ''; position: absolute; left: 10px; top: 0; bottom: 0;
    width: 2px; background: var(--border-color);
}
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-item::before {
    content: ''; position: absolute; left: -24px; top: 4px;
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid var(--primary); background: #fff;
}
.timeline-item.completed::before { background: var(--success); border-color: var(--success); }

/* ---- PAGINATION ---- */
.pagination .page-link {
    color: var(--primary); border-color: var(--border-color);
    font-size: 0.85rem; padding: 0.4rem 0.75rem;
}
.pagination .page-item.active .page-link {
    background: var(--primary); border-color: var(--primary);
}

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, var(--primary) 100%);
}
.login-card {
    width: 100%; max-width: 420px;
    background: #fff; border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    padding: 2.5rem;
}
.login-card .login-logo {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: #fff; font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: 0 6px 20px rgba(115,103,240,0.5);
}
.login-card h4 { text-align: center; margin-bottom: 0.5rem; }
.login-card p.subtitle { text-align: center; color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.875rem; }
.login-card .btn-login {
    width: 100%; padding: 0.7rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none; color: #fff; border-radius: var(--radius);
    font-weight: 600; font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(115,103,240,0.4);
    transition: var(--transition);
}
.login-card .btn-login:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(115,103,240,0.5); }

/* ---- EMPTY STATE ---- */
.empty-state {
    text-align: center; padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.empty-state p { font-size: 0.95rem; }

/* ---- ACTION BUTTONS ---- */
.action-btns { display: flex; gap: 0.35rem; }
.action-btns .btn {
    padding: 0.3rem 0.5rem; font-size: 0.8rem;
    border-radius: var(--radius);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .top-navbar .sidebar-toggle { display: block; }
    .top-navbar .navbar-search { width: 180px; }
}
@media (max-width: 575.98px) {
    .page-content { padding: 1rem; }
    .top-navbar .navbar-search { display: none; }
    .stat-card { padding: 1rem; }
}

/* ---- MISC ---- */
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cursor-pointer { cursor: pointer; }
.hover-shadow:hover { box-shadow: var(--shadow) !important; }
.border-left-primary { border-left: 3px solid var(--primary) !important; }
.border-left-success { border-left: 3px solid var(--success) !important; }
.border-left-warning { border-left: 3px solid var(--warning) !important; }
.border-left-danger { border-left: 3px solid var(--danger) !important; }
