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

:root {
    /* Primary Blue */
    --bs-primary: #1B84FF;
    --bs-primary-light: #E1F0FF;
    --bs-primary-active: #056EE9;

    /* Grays (Metronic scale) */
    --bs-gray-100: #F9F9F9;
    --bs-gray-200: #F1F1F4;
    --bs-gray-300: #DBDFE9;
    --bs-gray-400: #C4CADA;
    --bs-gray-500: #99A1B7;
    --bs-gray-600: #78829D;
    --bs-gray-700: #4B5675;
    --bs-gray-800: #252F4A;
    --bs-gray-900: #071437;

    /* Status Colors */
    --bs-success: #17C653;
    --bs-success-light: #EAFFF1;
    --bs-warning: #F6B100;
    --bs-warning-light: #FFF8DD;
    --bs-danger: #F8285A;
    --bs-danger-light: #FFEEF3;
    --bs-info: #7239EA;
    --bs-info-light: #F8F5FF;

    /* Backgrounds & Surfaces */
    --bg-body: #F5F8FA;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1E1E2D;
    --text-sidebar: #9899AC;
    --text-sidebar-hover: #FFFFFF;
    --bg-sidebar-hover: #1B1B29;

    /* Typography */
    --font-family: 'Inter', sans-serif;
    --text-color: var(--bs-gray-800);
    --text-muted: var(--bs-gray-500);
    
    /* Layout */
    --sidebar-width: 265px;
    --header-height: 70px;
    --border-radius: 0.75rem;
    --border-radius-sm: 0.45rem;
    --card-shadow: 0 0 20px 0 rgba(76, 87, 125, 0.02);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-color);
    line-height: 1.5;
    font-size: 14px;
}

a {
    color: var(--bs-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--bs-primary-active);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-logo h2 span {
    color: var(--bs-primary);
}

.sidebar-menu {
    padding: 20px 0;
    overflow-y: auto;
    flex: 1;
}

.menu-item {
    display: block;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 25px;
    color: var(--text-sidebar);
    transition: all 0.2s ease;
}

.menu-link:hover, .menu-item.active .menu-link {
    color: var(--text-sidebar-hover);
    background-color: var(--bg-sidebar-hover);
}

.menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.menu-title {
    font-size: 1.05rem;
    font-weight: 500;
}

.menu-section {
    padding: 15px 25px 5px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--bs-gray-600);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Main Content */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.app-header {
    height: var(--header-height);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    box-shadow: 0 5px 15px 0 rgba(76, 87, 125, 0.02);
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-toggle {
    display: none;
    cursor: pointer;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    position: relative;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bs-primary-light);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-weight: 600;
    color: var(--bs-gray-800);
}

.profile-role {
    font-size: 12px;
    color: var(--bs-gray-500);
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 0 20px 0 rgba(76, 87, 125, 0.1);
    border-radius: var(--border-radius);
    min-width: 200px;
    display: none;
    margin-top: 10px;
    overflow: hidden;
}

.profile-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--bs-gray-700);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bs-gray-100);
    color: var(--bs-primary);
}

/* Content Area */
.app-content {
    padding: 30px;
    flex: 1;
}

/* Page Title */
.page-title {
    margin-bottom: 25px;
}

.page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bs-gray-900);
    margin-bottom: 5px;
}

.page-title .breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: var(--bs-gray-500);
}

.breadcrumb-item a {
    color: var(--bs-gray-600);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--bs-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--bs-gray-900);
    margin: 0;
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--bs-gray-200);
    background: rgba(249, 249, 249, 0.5);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-family: var(--font-family);
    gap: 8px;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--bs-primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--bs-primary-active);
}

.btn-success {
    background-color: var(--bs-success);
    color: white;
}

.btn-success:hover {
    background-color: #12A844;
}

.btn-danger {
    background-color: var(--bs-danger);
    color: white;
}

.btn-danger:hover {
    background-color: #D61B48;
}

.btn-light {
    background-color: var(--bs-gray-100);
    color: var(--bs-gray-700);
}

.btn-light:hover {
    background-color: var(--bs-gray-200);
    color: var(--bs-gray-800);
}

.btn-outline-primary {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-gray-800);
    margin-bottom: 8px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 15px;
    font-size: 14px;
    font-family: var(--font-family);
    color: var(--bs-gray-700);
    background-color: #ffffff;
    border: 1px solid var(--bs-gray-300);
    border-radius: var(--border-radius-sm);
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(27, 132, 255, 0.1);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px dashed var(--bs-gray-300);
    text-align: left;
}

.table th {
    font-weight: 600;
    color: var(--bs-gray-600);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--bs-gray-300);
}

.table tbody tr:hover {
    background-color: var(--bs-gray-100);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-align: center;
}

.badge-success {
    background-color: var(--bs-success-light);
    color: var(--bs-success);
}

.badge-warning {
    background-color: var(--bs-warning-light);
    color: var(--bs-warning);
}

.badge-danger {
    background-color: var(--bs-danger-light);
    color: var(--bs-danger);
}

.badge-primary {
    background-color: var(--bs-primary-light);
    color: var(--bs-primary);
}

.badge-info {
    background-color: var(--bs-info-light);
    color: var(--bs-info);
}

.badge-secondary {
    background-color: var(--bs-gray-200);
    color: var(--bs-gray-700);
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: var(--bs-success-light);
    color: var(--bs-success);
    border: 1px dashed var(--bs-success);
}

.alert-danger {
    background-color: var(--bs-danger-light);
    color: var(--bs-danger);
    border: 1px dashed var(--bs-danger);
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 30px;
    height: 30px;
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--bs-gray-900);
    margin: 0;
}

.stat-info p {
    color: var(--bs-gray-500);
    font-weight: 500;
    margin: 0;
}

/* Authentication Pages */
.auth-body {
    background-color: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 15px;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    padding: 40px;
}

/* Responsive */
@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .header-toggle {
        display: block;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}
