/* admin_panel/css/style.css */

/* Custom Typography & Resets */
body {
    font-family: 'Outfit', sans-serif;
    background-color: #f4f7fa;
    color: #333333;
    overflow-x: hidden;
}

/* Auth Login Page Layout */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b4372 0%, #0d5c9e 100%);
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 450px;
    width: 100%;
    overflow: hidden;
    padding: 40px 30px;
}

.login-card.register-card {
    max-width: 650px;
}

.login-logo-wrapper {
    text-align: center;
    margin-bottom: 10px;
}

.login-logo {
    height: 60px;
    object-fit: contain;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #0b4372;
    text-align: center;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #777777;
    text-align: center;
    margin-bottom: 15px;
}

.form-floating-custom {
    position: relative;
    margin-bottom: 10px;
}

.form-floating-custom input,
.form-floating-custom select {
    background-color: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 16px 16px 45px;
    width: 100%;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

.form-floating-custom input:focus {
    border-color: #0b4372;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 67, 114, 0.1);
}

.form-floating-custom i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
}

.form-floating-custom .toggle-password {
    left: auto;
    right: 16px;
    cursor: pointer;
    z-index: 10;
}

.btn-admin-login {
    background-color: #0b4372;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    width: 100%;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-sales-manager {
    background-color: #0b4372;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.sales-bg {
    background-color: #0b4372 !important;
    color: white;
}

.btn-admin-login:hover {
    background-color: #083052;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 67, 114, 0.3);
}

/* Dashboard Core Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.admin-sidebar {
    width: 260px;
    background-color: #0b4372;
    color: #ffffff;
    flex-shrink: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand-img {
    height: 40px;
    object-fit: contain;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    flex-grow: 1;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-menu-item a i {
    margin-right: 15px;
    font-size: 18px;
}

.sidebar-menu-item a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-menu-item.active a {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
    border-left-color: #82b434;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sidebar-logout-btn i {
    margin-right: 10px;
}

.sidebar-logout-btn:hover {
    color: #ff4d4d;
}

/* Content Area */
.admin-content-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Prevents flex items from breaking overflow */
}

.admin-navbar {
    background-color: #ffffff;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-toggle-btn {
    background: transparent;
    border: none;
    color: #0b4372;
    font-size: 24px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
    user-select: none;
    z-index: 1030;
}

.sidebar-toggle-btn:hover {
    background-color: rgba(11, 67, 114, 0.08);
    color: #0d5c9e;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.admin-profile-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #0b4372;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.admin-main-content {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Metrics Cards */
.metric-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.metric-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.metric-icon-blue {
    background-color: rgba(11, 67, 114, 0.1);
    color: #0b4372;
}

.metric-icon-green { background-color: #eef5fb; color: #1a65a3; }

.metric-icon-yellow { background-color: #e6f0fa; color: #4a8bbf; }

.metric-card-title {
    font-size: 14px;
    color: #777777;
    font-weight: 500;
    margin-bottom: 5px;
}

.metric-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
}

/* Admin Data Tables */
.admin-table-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: none;
    margin-bottom: 30px;
    overflow: hidden;
}

.admin-table-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f2f5;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-table-title {
    font-size: 18px;
    font-weight: 700;
    color: #0b4372;
    margin: 0;
}

.table-responsive-custom {
    padding: 10px 25px 25px 25px;
}

.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    font-weight: 600;
    color: #718096;
    border-bottom: 2px solid #edf2f7;
    padding: 12px 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom td {
    padding: 16px;
    vertical-align: middle;
    color: #4a5568;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* Badge Styles */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-new { background-color: #eef5fb; color: #4a8bbf; border: 1px solid #cce0f2; }

.badge-progress { background-color: #e6f0fa; color: #216298; border: 1px solid #c4dbf0; }

.badge-resolved { background-color: #0b4372; color: #ffffff; border: 1px solid #0b4372; }

.badge-active { background-color: #062a4a; color: #ffffff; border: 1px solid #062a4a; }

.badge-inactive { background-color: #f0f4f8; color: #7a9ebf; border: 1px solid #d1e1f0; }

/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: none;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.btn-action-edit {
    background-color: rgba(11, 67, 114, 0.08);
    color: #0b4372;
}

.btn-action-edit:hover {
    background-color: #0b4372;
    color: #ffffff;
}

.btn-action-delete { background-color: #f0f4f8; color: #4a8bbf; }

.btn-action-delete:hover { background-color: #4a8bbf; color: #ffffff; }

.btn-action-view { background-color: #eef5fb; color: #1a65a3; }

.btn-action-view:hover { background-color: #1a65a3; color: #ffffff; }

/* Premium Buttons */
.btn-premium-primary {
    background-color: #0b4372;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-premium-primary:hover {
    background-color: #073154;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(11, 67, 114, 0.2);
}

.btn-premium-success {
    background-color: #0b4372;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-premium-success:hover {
    background-color: #083052;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 67, 114, 0.25);
}

/* Modals */
.modal-content-custom {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.modal-header-custom {
    background-color: #0b4372;
    color: #ffffff;
    padding: 20px 25px;
    border-bottom: none;
}

.modal-header-custom .modal-title {
    font-weight: 700;
}

.modal-header-custom .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.modal-body-custom {
    padding: 25px;
}

.modal-footer-custom {
    border-top: 1px solid #edf2f7;
    padding: 15px 25px 25px 25px;
}

/* Form Styling */
.form-label-custom {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control-custom {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control-custom:focus {
    border-color: #0b4372;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(11, 67, 114, 0.08);
}

/* Custom Width Helpers (to replace inline styling) */
.w-80px {
    width: 80px;
}

.w-100px {
    width: 100px;
}

.w-120px {
    width: 120px;
}

.w-150px {
    width: 150px;
}

.w-200px {
    width: 200px;
}

.min-h-120px {
    min-height: 120px;
}

/* Responsive Adjustments */
/* Responsive Adjustments & Sidebar Collapse */
@media (min-width: 992px) {
    .admin-sidebar.collapsed {
        margin-left: -260px;
    }
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        margin-left: -260px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .admin-sidebar.show {
        margin-left: 0;
    }

    .admin-main-content {
        padding: 20px;
    }
}

/* Premium Badges & Action Buttons */
.badge-complaint {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid transparent;
    text-transform: capitalize;
}
.badge-complaint-pending { background-color: #f4f8fc; color: #4a8bbf; border-color: #d9e8f5; }
.badge-complaint-progress { background-color: #e6f0fa; color: #216298; border-color: #c4dbf0; }
.badge-complaint-mediation { background-color: #d9e8f5; color: #1a65a3; border-color: #abcbed; }
.badge-complaint-hearing { background-color: #cce0f2; color: #13518a; border-color: #94bded; }
.badge-complaint-resolved { background-color: #0b4372; color: #ffffff; border-color: #0b4372; }
.badge-complaint-unknown { background-color: #f8f9fa; color: #6c757d; border-color: #e9ecef; }

.btn-action-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.btn-action-premium:hover {
    background: #0b4372;
    color: #ffffff;
    border-color: #0b4372;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(11, 67, 114, 0.15);
}
.btn-action-premium i {
    font-size: 16px;
}

.btn-assign-agent-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e7f5ff;
    color: #1c7ed6;
    border: 1px solid #a5d8ff;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    vertical-align: middle;
}
.btn-assign-agent-premium:hover {
    background: #1c7ed6;
    color: #ffffff;
    border-color: #1c7ed6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(28, 126, 214, 0.15);
}
.btn-assign-agent-premium i {
    font-size: 16px;
}

/* Premium Approve & Approved Buttons */
.btn-premium-approve {
    background: linear-gradient(135deg, #0b4372 0%, #1a65a3 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 30px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(11, 67, 114, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap !important;
}

.btn-premium-approve:hover { background: linear-gradient(135deg, #062a4a 0%, #0b4372 100%); color: #ffffff !important; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(11, 67, 114, 0.3); }

.btn-premium-approved-disabled { background: #e6f0fa; color: #216298; border: 1px solid #c4dbf0; border-radius: 30px; padding: 6px 14px; font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap !important; transition: all 0.3s ease; }

.btn-premium-approved-disabled:hover { background: #cce0f2; color: #216298; }


/* Monochromatic overrides for Bootstrap Background Classes */
.bg-success { background-color: #0b4372 !important; color: #ffffff !important; }
.bg-warning { background-color: #e6f0fa !important; color: #216298 !important; }
.bg-danger { background-color: #cce0f2 !important; color: #13518a !important; }
.bg-info { background-color: #eef5fb !important; color: #1a65a3 !important; }

/* Monochromatic overrides for Bootstrap Buttons */
.btn-success { background-color: #0b4372 !important; color: #ffffff !important; border-color: #0b4372 !important; }
.btn-success:hover { background-color: #062a4a !important; border-color: #062a4a !important; }
.btn-warning { background-color: #4a8bbf !important; color: #ffffff !important; border-color: #4a8bbf !important; }
.btn-warning:hover { background-color: #216298 !important; border-color: #216298 !important; }
.btn-danger { background-color: #cce0f2 !important; color: #13518a !important; border-color: #cce0f2 !important; }
.btn-danger:hover { background-color: #abcbed !important; border-color: #abcbed !important; }
.btn-primary { background-color: #1a65a3 !important; border-color: #1a65a3 !important; }
.btn-primary:hover { background-color: #0b4372 !important; border-color: #0b4372 !important; }

