/* ===== FB MASTER 2025 - Creative Space Design (Full Version) ===== */

:root {
    --main: #1877f2;
    --success: #00d25b;
    --danger: #fc424a;
    --purple: #9c27b0;
    --gold: #ffd700;
    --dark: #121212;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #fff;
    min-height: 100vh;
    padding: 15px;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1300px;
    margin: auto;
}

/* ===== Header ===== */
.header, .page-header {
    text-align: center;
    background: linear-gradient(135deg, var(--main), var(--purple));
    padding: 35px;
    border-radius: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

h1 {
    font-size: 2.5em;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

/* ===== Cards ===== */
.card, .form-section, .table-responsive, .dashboard-section {
    background: rgba(255, 255, 255, 0.98);
    color: #222;
    border-radius: 25px;
    padding: 30px;
    margin: 25px 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* ===== Buttons ===== */
button, .btn {
    padding: 15px 30px;
    border: none;
    border-radius: 15px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    font-size: 1.2em;
    margin: 10px 5px;
    display: inline-block;
    text-decoration: none;
}

button:disabled, .btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none !important;
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary, .btn-main {
    background: linear-gradient(45deg, var(--main), #00c6ff);
}

.btn-success {
    background: linear-gradient(45deg, var(--success), #009b40);
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger), #ff0055);
}

.btn-purple {
    background: linear-gradient(45deg, var(--purple), #6a0080);
}

.btn-gold {
    background: linear-gradient(45deg, var(--gold), #ffaa00);
    color: #000;
}

.btn-dark, .btn-secondary {
    background: #333;
    color: #fff;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.95em;
}

.btn-lg {
    padding: 18px 45px;
    font-size: 1.3em;
}


/* ===== Form Elements ===== */
textarea, input, select, .form-control {
    width: 100%;
    padding: 15px;
    border-radius: 15px;
    border: 2px solid #ddd;
    margin: 10px 0;
    font-size: 16px;
    background: #f9f9f9;
    color: #333;
}

textarea:focus, input:focus, select:focus, .form-control:focus {
    border-color: var(--main);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #666;
}

/* ===== Alerts ===== */
.alert {
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 2px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 2px solid var(--danger);
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 2px solid var(--gold);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border: 2px solid var(--main);
}

/* ===== Tabs ===== */
.tabs, .extractor-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background: #333;
    color: #fff;
    transition: 0.4s;
    white-space: nowrap;
    border: none;
}

.tab-btn:hover {
    background: #444;
}

.tab-btn.active {
    background: var(--main);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.tab-btn.gold-tab {
    background: linear-gradient(45deg, #ffd700, #ffaa00);
    color: black;
}

.tab-btn.green-tab {
    background: linear-gradient(45deg, #00d25b, #009b40);
    color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== Dashboard Layout ===== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    border-radius: 0 20px 20px 0;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--main), var(--purple));
    color: white;
    text-align: center;
}

.sidebar-header h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 10px;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 10px;
    font-weight: 500;
}

.sidebar-menu li a:hover {
    background: rgba(24, 119, 242, 0.1);
    color: var(--main);
    transform: translateX(-3px);
}

.sidebar-menu li a.active {
    background: linear-gradient(135deg, var(--main), #667eea);
    color: white;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
}

.sidebar-menu li a i {
    margin-left: 12px;
    width: 20px;
    font-size: 1.1em;
}

.main-content {
    flex: 1;
    margin-right: 260px;
    padding: 30px;
    min-height: 100vh;
}

/* ===== Stats Cards ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    color: #333;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--main), #667eea);
    color: white;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 2em;
    color: #333;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9em;
}

/* ===== Accounts Grid ===== */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.account-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    color: #333;
}

.account-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--main), var(--purple));
}

.account-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.account-card.valid {
    border-color: var(--success);
}

.account-card.valid::before {
    background: var(--success);
}

.account-card.invalid {
    border-color: var(--danger);
    opacity: 0.7;
}

.account-card.invalid::before {
    background: var(--danger);
}

.account-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.account-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--main), #667eea);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
}

.account-info {
    flex: 1;
}

.account-info h3 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1.2em;
}

.account-info p {
    color: #666;
    font-size: 0.9em;
    margin: 3px 0;
}

.account-info small {
    color: #999;
    font-size: 0.85em;
    display: block;
    margin-top: 5px;
}


/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px;
    text-align: right;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid var(--main);
}

.table tbody td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    color: #333;
}

.table tbody tr:hover {
    background: rgba(24, 119, 242, 0.05);
}

/* ===== Badges ===== */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-danger {
    background: var(--danger);
    color: white;
}

.badge-warning {
    background: var(--gold);
    color: #333;
}

.badge-free {
    background: #6c757d;
    color: white;
}

.badge-premium {
    background: #ff6b6b;
    color: white;
}

.badge-vip {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #333;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    margin: 5% auto;
    padding: 30px;
    border-radius: 25px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
    color: #333;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: 0.3s;
}

.close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* ===== Progress Bar ===== */
.progress {
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--main), var(--success));
    width: 0%;
    transition: width 0.3s;
}

/* ===== Status ===== */
.status {
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.1em;
    display: inline-block;
}

.status.on {
    background: var(--success);
    color: #fff;
}

.status.off {
    background: var(--danger);
    color: #fff;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ccc;
}

/* ===== Login Page ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.6s ease;
}

.logo {
    text-align: center;
    margin-bottom: 35px;
}

.logo h1 {
    background: linear-gradient(135deg, var(--main), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8em;
    margin-bottom: 10px;
}

.logo p {
    color: #666;
    font-size: 1.1em;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--main);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ===== Welcome Section ===== */
.welcome-section {
    background: linear-gradient(135deg, rgba(24, 119, 242, 0.1), rgba(156, 39, 176, 0.1));
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-section h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2em;
}

.welcome-section p {
    color: #666;
    font-size: 1.1em;
}

/* ===== Quick Actions Grid ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.quick-action-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #333;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.quick-action-card i {
    font-size: 48px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--main), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-action-card h3 {
    color: #333;
    margin-bottom: 10px;
}

.quick-action-card p {
    color: #666;
    font-size: 0.9em;
}

/* ===== Activity List ===== */
.activity-list {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(24, 119, 242, 0.05);
    border-radius: 10px;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--main), #667eea);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-details {
    flex: 1;
}

.activity-details h4 {
    color: #333;
    margin-bottom: 5px;
    font-size: 1em;
}

.activity-details p {
    color: #666;
    font-size: 0.85em;
}

.activity-time {
    color: #999;
    font-size: 0.85em;
}

/* ===== Checkbox Sections (Sensor & Activ) ===== */
.activ-option {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0;
    border: 2px solid #ccc;
    transition: 0.3s;
}

.activ-option.active {
    border-color: var(--success);
    background: #e6fffa;
    box-shadow: 0 5px 15px rgba(0, 210, 91, 0.2);
}

.activ-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.activ-header h3, .activ-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.activ-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

.activ-body {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.activ-body.active {
    display: block;
}

/* ===== Results Box ===== */
.results-box {
    background: #1a1a1a;
    color: #0f0;
    padding: 20px;
    border-radius: 15px;
    font-family: monospace;
    font-size: 14px;
    border: 2px solid #444;
    margin: 20px 0;
    max-height: 300px;
    overflow-y: auto;
}

.results-box::-webkit-scrollbar {
    width: 8px;
}

.results-box::-webkit-scrollbar-track {
    background: #222;
}

.results-box::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

/* ===== Posts Grid ===== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.post-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: 0.3s;
    border: 3px solid transparent;
}

.post-card:hover {
    transform: scale(1.03);
}

.post-card.selected {
    border-color: var(--success);
    background: #f0fff4;
}

.post-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.post-info {
    padding: 10px;
    font-size: 0.9em;
    color: #555;
}

/* ===== Accordion ===== */
.accordion-item {
    border: 2px solid #eee;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
}

.accordion-header {
    background: #f8f9fa;
    color: #333;
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    transition: all 0.3s;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header.active {
    background: var(--main);
    color: #fff;
}

.accordion-body {
    padding: 15px;
    display: none;
    background: #fff;
}

.accordion-body.active {
    display: block;
}

/* ===== Extractor Sub-Tabs ===== */
.extractor-tabs, .sub-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
}

.sub-tab {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.sub-tab:hover {
    color: var(--main);
    background: rgba(24, 119, 242, 0.05);
}

.sub-tab.active {
    color: var(--main);
    border-bottom-color: var(--main);
}

.sub-tab-content {
    display: none;
}

.sub-tab-content.active {
    display: block;
}

.status-box {
    background: #e2e3e5;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    display: none;
    color: #333;
}

.status-box.active {
    display: block;
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-10 { padding: 10px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-right: 220px;
    }
    
    h1 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        border-radius: 20px;
        margin-bottom: 20px;
    }
    
    .main-content {
        margin-right: 0;
        padding: 15px;
    }
    
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .header, .page-header {
        padding: 25px 20px;
    }
    
    .card, .form-section, .table-responsive, .dashboard-section {
        padding: 20px;
        margin: 15px 0;
    }
    
    button, .btn {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .btn-lg {
        padding: 15px 35px;
        font-size: 1.1em;
    }
    
    .tabs, .extractor-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        border-radius: 0;
    }
    
    .tab-btn:first-child {
        border-radius: 20px 20px 0 0;
    }
    
    .tab-btn:last-child {
        border-radius: 0 0 20px 20px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .accounts-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }
    
    .login-box {
        padding: 35px 25px;
    }
    
    .logo h1 {
        font-size: 2.2em;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .account-header {
        flex-direction: column;
        text-align: center;
    }
    
    .sub-tabs {
        flex-direction: column;
    }
    
    .sub-tab {
        border-bottom: 1px solid #eee;
    }
    
    .sub-tab.active {
        border-bottom: 3px solid var(--main);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }
    
    .header, .page-header {
        padding: 20px 15px;
        border-radius: 20px;
    }
    
    .card, .form-section {
        padding: 15px;
        border-radius: 20px;
    }
    
    button, .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    
    .btn-sm {
        padding: 6px 15px;
        font-size: 0.85em;
    }
    
    textarea, input, select, .form-control {
        padding: 12px;
        font-size: 14px;
    }
    
    .logo h1 {
        font-size: 1.8em;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-info h3 {
        font-size: 1.5em;
    }
    
    .account-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}

/* ===== Print Styles ===== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .sidebar,
    button,
    .btn {
        display: none;
    }
    
    .main-content {
        margin: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== Animation Keyframes ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== Loading Spinner ===== */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--main);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* ===== Save Notification ===== */
.save-notif {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    display: none;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--main), var(--purple));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--purple), var(--main));
}

/* ===== Selection Styling ===== */
::selection {
    background: var(--main);
    color: white;
}

::-moz-selection {
    background: var(--main);
    color: white;
}

/* ===== Focus Visible ===== */
*:focus-visible {
    outline: 3px solid var(--main);
    outline-offset: 2px;
}

/* ===== Disabled State ===== */
*:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== End of Creative CSS ===== */


/* ===== Mobile Sidebar Enhancement ===== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        z-index: 1001;
        overflow-y: auto;
    }
    
    .sidebar.active {
        right: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        backdrop-filter: blur(3px);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .mobile-menu-toggle {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 999;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--main), var(--purple));
        border: none;
        color: white;
        font-size: 1.5em;
        cursor: pointer;
        box-shadow: 0 5px 20px rgba(24, 119, 242, 0.4);
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-toggle:hover {
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(24, 119, 242, 0.6);
    }
    
    .mobile-menu-toggle.active {
        background: linear-gradient(135deg, var(--danger), #ff0055);
    }
    
    .main-content {
        padding-top: 80px;
    }
}

/* ===== Improved Mobile Responsive ===== */
@media (max-width: 480px) {
    .page-header {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 1.5em;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .accounts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .account-card {
        padding: 20px;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1em;
    }
    
    .btn-block {
        width: 100%;
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 5% auto;
    }
    
    .table {
        font-size: 0.9em;
    }
    
    .table thead {
        display: none;
    }
    
    .table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 10px;
        padding: 10px;
    }
    
    .table tbody td {
        display: block;
        text-align: right;
        padding: 8px;
        border: none;
    }
    
    .table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        display: inline-block;
        margin-left: 10px;
    }
}

/* ===== Smooth Animations ===== */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.sidebar.animating-in {
    animation: slideInRight 0.3s ease-out;
}

.sidebar.animating-out {
    animation: slideOutRight 0.3s ease-out;
}

/* ===== Touch-Friendly Improvements ===== */
@media (max-width: 768px) {
    button, .btn, a {
        min-height: 44px; /* iOS recommended touch target */
        min-width: 44px;
    }
    
    .sidebar-menu li a {
        padding: 15px;
        font-size: 1.1em;
    }
    
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 24px;
        min-height: 24px;
    }
}

/* ===== Loading States ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.loading-content .spinner {
    width: 60px;
    height: 60px;
    border-width: 6px;
    margin: 0 auto 20px;
}

.loading-content p {
    color: #333;
    font-size: 1.1em;
    margin: 0;
}


/* ===== Quick Actions Fix ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.quick-action-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.quick-action-card i {
    font-size: 48px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--main), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-action-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.quick-action-card p {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

@media (max-width: 768px) {
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .quick-action-card {
        padding: 20px;
        min-height: 150px;
    }
    
    .quick-action-card i {
        font-size: 36px;
    }
    
    .quick-action-card h3 {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .quick-action-card {
        padding: 15px;
        min-height: 120px;
    }
    
    .quick-action-card i {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .quick-action-card h3 {
        font-size: 0.9em;
        margin-bottom: 5px;
    }
    
    .quick-action-card p {
        font-size: 0.8em;
    }
}


/* ===== Dashboard Quick Actions Buttons ===== */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--main), var(--purple));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.quick-action-btn:hover::before {
    opacity: 0.2;
}

.quick-action-btn:hover {
    transform: translateY(-5px);
    border-color: var(--main);
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.3);
}

.quick-action-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--main), var(--purple));
    border-radius: 15px;
    font-size: 28px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
}

.quick-action-text h3 {
    font-size: 1.2em;
    margin: 0 0 5px 0;
    color: #fff;
}

.quick-action-text p {
    font-size: 0.9em;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .quick-action-btn {
        padding: 20px;
        gap: 15px;
    }
    
    .quick-action-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .quick-action-text h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quick-action-btn {
        padding: 18px;
    }
}
