/* ========================================
   Craftsman Accounts - Dashboard Styles
   Clean, Modern, RTL Arabic Dashboard
   ======================================== */

/* ---- CSS Variables ---- */
:root {
    --primary: #6c5ce7;
    --primary-light: #a29bfe;
    --primary-dark: #5541d0;
    --secondary: #636e72;
    --success: #00b894;
    --success-light: #55efc4;
    --danger: #e17055;
    --danger-light: #fab1a0;
    --warning: #fdcb6e;
    --warning-dark: #e0a800;
    --info: #74b9ff;
    --info-dark: #0984e3;
    --teal: #00cec9;
    --purple: #6c5ce7;
    --pink: #fd79a8;
    --sidebar-bg: #1a1a2e;
    --sidebar-hover: #16213e;
    --sidebar-active: #0f3460;
    --sidebar-text: #a4b0be;
    --sidebar-text-active: #ffffff;
    --sidebar-width: 270px;
    --topbar-height: 65px;
    --body-bg: #f0f2f5;
    --card-bg: #ffffff;
    --card-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    --card-hover-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --border-color: #e9ecef;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Cairo', sans-serif;
}

/* ---- Base ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--body-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   LOGIN PAGE
   ======================================== */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.login-bg-shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--info);
    bottom: -80px;
    left: -80px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--success);
    top: 50%;
    left: 30%;
    animation: float 12s ease-in-out infinite;
}

.shape-4 {
    width: 150px;
    height: 150px;
    background: var(--pink);
    top: 20%;
    right: 25%;
    animation: float 9s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(5deg); }
    66% { transform: translateY(20px) rotate(-3deg); }
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3); }
    50% { box-shadow: 0 10px 40px rgba(108, 92, 231, 0.5); }
}

.login-logo i {
    font-size: 36px;
    color: white;
}

.login-header h2 {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-form .form-group-custom {
    margin-bottom: 20px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    z-index: 2;
    transition: var(--transition);
    pointer-events: none;
}

.form-control-custom {
    padding: 12px 45px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--card-bg);
}

.form-control-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.form-control-custom:focus ~ .input-icon,
.form-control-custom:focus + .input-icon {
    color: var(--primary);
}

.form-select-custom {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--card-bg);
}

.form-select-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.toggle-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.toggle-password:hover {
    color: var(--primary);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.btn-login:hover::before {
    left: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 70px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo i {
    font-size: 28px;
    color: var(--primary-light);
    animation: pulse-glow 3s ease-in-out infinite;
}

.sidebar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.sidebar-close {
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.sidebar-close:hover {
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    margin: 2px 12px;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: var(--sidebar-text);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    gap: 12px;
    position: relative;
    font-size: 0.93rem;
}

.sidebar-menu-item a i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-menu-item a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(-3px);
}

.sidebar-menu-item.active a {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.sidebar-menu-item.active a i {
    color: white;
}

.sidebar-badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: auto;
    min-width: 22px;
    text-align: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-avatar i {
    color: white;
    font-size: 1rem;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
}

.sidebar-user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-user-role {
    color: var(--sidebar-text);
    font-size: 0.75rem;
}

/* ========================================
   MAIN WRAPPER
   ======================================== */
.dashboard-body {
    background: var(--body-bg);
}

.main-wrapper {
    margin-right: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* ========================================
   TOP NAVBAR
   ======================================== */
.top-navbar {
    height: var(--topbar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.04);
}

.top-navbar-right,
.top-navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: none;
}

.sidebar-toggle:hover {
    background: var(--body-bg);
    color: var(--primary);
}

.page-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.notification-wrapper {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.notification-btn:hover {
    background: var(--body-bg);
    color: var(--primary);
}

.notification-count {
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 350px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 200;
    display: none;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.notification-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-color);
}

.notification-header h6 {
    font-weight: 700;
    margin: 0;
    font-size: 0.9rem;
}

.clear-notifications {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-family);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    animation: slideDown 0.3s ease-out;
}

.notification-item:hover {
    background: var(--body-bg);
}

.notification-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.notification-item-icon.success { background: rgba(0, 184, 148, 0.1); color: var(--success); }
.notification-item-icon.danger { background: rgba(225, 112, 85, 0.1); color: var(--danger); }
.notification-item-icon.warning { background: rgba(253, 203, 110, 0.15); color: var(--warning-dark); }
.notification-item-icon.info { background: rgba(116, 185, 255, 0.1); color: var(--info-dark); }

.notification-item-content {
    flex: 1;
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.notification-item-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.notification-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.notification-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.notification-empty p {
    font-size: 0.85rem;
    margin: 0;
}

.logout-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

/* ========================================
   PAGE CONTENT
   ======================================== */
.page-content {
    padding: 25px;
}

.page-header {
    margin-bottom: 25px;
}

.page-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header-content h4 {
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* ========================================
   STAT CARDS
   ======================================== */
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.stat-card-primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card-success::before { background: linear-gradient(90deg, var(--success), var(--success-light)); }
.stat-card-warning::before { background: linear-gradient(90deg, var(--warning-dark), var(--warning)); }
.stat-card-info::before { background: linear-gradient(90deg, var(--info-dark), var(--info)); }
.stat-card-purple::before { background: linear-gradient(90deg, #6c5ce7, #a29bfe); }
.stat-card-teal::before { background: linear-gradient(90deg, #00cec9, #81ecec); }

.stat-card-body {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.stat-icon {
    width: 55px;
    height: 55px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card-primary .stat-icon { background: rgba(108, 92, 231, 0.1); color: var(--primary); }
.stat-card-success .stat-icon { background: rgba(0, 184, 148, 0.1); color: var(--success); }
.stat-card-warning .stat-icon { background: rgba(253, 203, 110, 0.15); color: var(--warning-dark); }
.stat-card-info .stat-icon { background: rgba(9, 132, 227, 0.1); color: var(--info-dark); }
.stat-card-purple .stat-icon { background: rgba(108, 92, 231, 0.1); color: #6c5ce7; }
.stat-card-teal .stat-icon { background: rgba(0, 206, 201, 0.1); color: #00cec9; }

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 3px 0 0;
}

.stat-card-footer {
    padding: 12px 25px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.01);
}

.stat-card-footer a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.stat-card-footer a:hover {
    color: var(--primary);
}

/* ========================================
   SECTION CARD
   ======================================== */
.section-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 25px;
    border-bottom: 1px solid var(--border-color);
}

.section-header h5 {
    font-weight: 700;
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.section-body {
    padding: 25px;
}

.dashboard-section {
    margin-top: 30px;
}

/* ========================================
   TABLES
   ======================================== */
.table-custom {
    margin: 0;
    font-size: 0.9rem;
}

.table-custom thead th {
    background: var(--body-bg);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 14px 18px;
    border: none;
    font-size: 0.83rem;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 14px 18px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.table-row-animated {
    transition: var(--transition);
}

.table-row-animated:hover {
    background: rgba(108, 92, 231, 0.03);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-sm {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar-sm i {
    color: white;
    font-size: 0.75rem;
}

/* ========================================
   STATUS BADGES
   ======================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-active { background: rgba(0, 184, 148, 0.12); color: var(--success); }
.status-inactive { background: rgba(99, 110, 114, 0.12); color: var(--secondary); }
.status-pending { background: rgba(253, 203, 110, 0.2); color: var(--warning-dark); }
.status-approved { background: rgba(0, 184, 148, 0.12); color: var(--success); }
.status-rejected { background: rgba(225, 112, 85, 0.12); color: var(--danger); }
.status-paid { background: rgba(9, 132, 227, 0.1); color: var(--info-dark); }

/* ========================================
   ACTION BUTTONS
   ======================================== */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-action {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-action-edit { background: rgba(108, 92, 231, 0.1); color: var(--primary); }
.btn-action-edit:hover { background: var(--primary); color: white; }
.btn-action-success { background: rgba(0, 184, 148, 0.1); color: var(--success); }
.btn-action-success:hover { background: var(--success); color: white; }
.btn-action-warning { background: rgba(253, 203, 110, 0.2); color: var(--warning-dark); }
.btn-action-warning:hover { background: var(--warning-dark); color: white; }
.btn-action-danger { background: rgba(225, 112, 85, 0.1); color: var(--danger); }
.btn-action-danger:hover { background: var(--danger); color: white; }

/* ========================================
   FILTER CARD
   ======================================== */
.filter-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px 25px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.results-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 15px;
    padding: 0 5px;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.pagination-custom {
    gap: 5px;
}

.pagination-custom .page-link {
    border: none;
    border-radius: var(--radius-sm) !important;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 14px;
    transition: var(--transition);
    font-family: var(--font-family);
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pagination-custom .page-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.pagination-custom .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.pagination-custom .page-item.disabled .page-link {
    opacity: 0.5;
    background: var(--body-bg);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 22px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(108, 92, 231, 0.3);
    color: white;
}

.btn-approve {
    background: linear-gradient(135deg, var(--success), #26d0a0);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-approve:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 184, 148, 0.3);
    color: white;
}

.btn-reject {
    background: linear-gradient(135deg, var(--danger), #ff7675);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-reject:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(225, 112, 85, 0.3);
    color: white;
}

.btn-paid {
    background: linear-gradient(135deg, var(--info-dark), var(--info));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-paid:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(9, 132, 227, 0.3);
    color: white;
}

/* ========================================
   APPROVAL CARDS
   ======================================== */
.approval-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    border: 2px solid transparent;
}

.approval-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(108, 92, 231, 0.2);
}

.approval-card-header {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
}

.approval-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--warning-dark), var(--warning));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.approval-avatar i {
    color: white;
    font-size: 1.1rem;
}

.approval-user-info {
    flex: 1;
}

.approval-user-info h5 {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 2px;
}

.approval-card-body {
    padding: 18px 22px;
}

.approval-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.approval-detail:last-child {
    margin-bottom: 0;
}

.approval-detail i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.approval-card-footer {
    padding: 15px 22px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.01);
}

/* ========================================
   SUBSCRIPTION TYPE CARDS
   ======================================== */
.subscription-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
}

.subscription-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(108, 92, 231, 0.2);
}

.subscription-card-inactive {
    opacity: 0.65;
}

.subscription-card-header {
    padding: 30px 20px 15px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(162, 155, 254, 0.05));
}

.subscription-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

.subscription-icon i {
    color: white;
    font-size: 1.4rem;
}

.subscription-name {
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
}

.subscription-card-body {
    padding: 20px;
}

.subscription-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    margin-bottom: 12px;
}

.price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.price-currency {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.subscription-duration {
    font-size: 0.87rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.subscription-details {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 15px;
    min-height: 50px;
}

.subscription-card-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   USER SUBSCRIPTION CARDS
   ======================================== */
.user-sub-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    overflow: hidden;
    border-top: 4px solid transparent;
}

.user-sub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.sub-status-pending { border-top-color: var(--warning); }
.sub-status-approved { border-top-color: var(--success); }
.sub-status-rejected { border-top-color: var(--danger); }
.sub-status-paid { border-top-color: var(--info-dark); }

.user-sub-header {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.user-sub-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-sub-avatar i {
    color: white;
    font-size: 0.9rem;
}

.user-sub-info {
    flex: 1;
}

.user-sub-info h6 {
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 0 2px;
}

.user-sub-body {
    padding: 20px;
}

.user-sub-price {
    text-align: center;
    margin-bottom: 18px;
}

.price-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.price-unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-right: 5px;
}

.user-sub-dates {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.83rem;
    color: var(--text-secondary);
}

.paid-badge {
    margin-top: 15px;
    text-align: center;
    background: rgba(9, 132, 227, 0.08);
    color: var(--info-dark);
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
}

.user-sub-footer {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.01);
}

.completed-text {
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px;
}

/* ========================================
   FORM SWITCH
   ======================================== */
.form-switch-custom .form-check-input {
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.form-switch-custom .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-switch-custom .form-check-label {
    padding-right: 8px;
    padding-top: 2px;
    cursor: pointer;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    padding: 60px 30px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.empty-state h5 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
}

.empty-state-icon-success {
    display: inline-block;
    margin-bottom: 15px;
}

.empty-state-icon-success i {
    font-size: 4rem;
    color: var(--success);
    opacity: 0.7;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    max-width: 380px;
}

.toast-notification {
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toastIn 0.4s ease-out;
    border-right: 4px solid var(--primary);
    min-width: 300px;
}

.toast-notification.toast-success { border-right-color: var(--success); }
.toast-notification.toast-danger { border-right-color: var(--danger); }
.toast-notification.toast-warning { border-right-color: var(--warning-dark); }
.toast-notification.toast-info { border-right-color: var(--info-dark); }

.toast-notification.toast-out {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-30px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(-30px) scale(0.95); }
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.toast-success .toast-icon { background: rgba(0, 184, 148, 0.1); color: var(--success); }
.toast-danger .toast-icon { background: rgba(225, 112, 85, 0.1); color: var(--danger); }
.toast-warning .toast-icon { background: rgba(253, 203, 110, 0.15); color: var(--warning-dark); }
.toast-info .toast-icon { background: rgba(9, 132, 227, 0.1); color: var(--info-dark); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ========================================
   ALERT OVERRIDES
   ======================================== */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(0, 184, 148, 0.1);
    color: #00875a;
}

.alert-danger {
    background: rgba(225, 112, 85, 0.1);
    color: #c0392b;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-right: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .page-content {
        padding: 15px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .login-card {
        padding: 35px 25px;
    }

    .notification-dropdown {
        width: 300px;
        left: -50px;
    }

    .filter-card {
        padding: 15px;
    }
}

@media (max-width: 575.98px) {
    .top-navbar {
        padding: 0 15px;
    }

    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .approval-card-footer {
        flex-direction: column;
    }

    .user-sub-footer {
        flex-direction: column;
    }
}

/* ========================================
   SCROLL BAR
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========================================
   ANIMATION UTILITIES
   ======================================== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
