/* ============================================
   PREMIUM CLIENT AREA UNIFIED STYLES
   Matching Blog & Checkout Design
   ============================================ */

:root {
    --color-primary: #2d3c58;
    --color-secondary: #2d3c58;
    --color-accent: #e6ff7b;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --gray-light: #f8fafc;
    --gray-border: #e0e6ee;
}

/* ============================================
   GLOBAL IMPROVEMENTS
   ============================================ */

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    background: #fff;
}

.container {
    max-width: 1200px;
}

/* ============================================
   PAGE HEADERS
   ============================================ */

.header-lined {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2538 100%);
    color: #fff;
    padding: 60px 40px;
    border-radius: 0 0 28px 28px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.header-lined::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    opacity: 0.08;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(230,255,123,0.4)"/></svg>');
}

.header-lined h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 2;
    color: #fff;
}

/* ============================================
   CARDS & PANELS
   ============================================ */

.card {
    background: #fff;
    border: 2px solid var(--gray-border);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(45, 60, 88, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 28px;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 32px rgba(45, 60, 88, 0.12);
    transform: translateY(-4px);
}

.card-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2538 100%);
    color: #fff;
    padding: 20px 28px;
    border: none;
    position: relative;
}

.card-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 2;
    color: #fff;
}

.card-title i {
    color: var(--color-accent);
    margin-left: 12px;
}

.card-body {
    padding: 32px 28px;
}

.card-footer {
    background: var(--gray-light);
    border-top: 2px solid var(--gray-border);
    padding: 20px 28px;
}

/* ============================================
   TABLES
   ============================================ */

.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2538 100%);
    color: #fff;
    font-weight: 700;
    padding: 16px 20px;
    border: none;
    text-align: right;
    font-size: 0.95rem;
}

.table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--gray-border);
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 100%);
    transform: scale(1.01);
}

.table tbody td {
    padding: 18px 20px;
    vertical-align: middle;
    color: #334155;
    font-size: 0.95rem;
}

.table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.table tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-secondary), #0f4b76);
    color: #fff;
    box-shadow: 0 4px 16px rgb(8 93 178 / 30%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success), #059669);
    color: #fff;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--color-danger), #dc2626);
    color: #fff;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--color-warning), #d97706);
    color: #fff;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #06b6d4, var(--color-secondary));
    color: #fff;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

.btn-default,
.btn-secondary {
    background: #fff;
    color: var(--color-primary);
    border: 2px solid var(--gray-border);
}

.btn-default:hover,
.btn-secondary:hover {
    border-color: var(--color-secondary);
    background: #ecfeff;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================
   BADGES & LABELS
   ============================================ */

.badge {
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
}

.badge-success {
    background: linear-gradient(135deg, var(--color-success), #059669);
    color: #fff;
}

.badge-danger {
    background: linear-gradient(135deg, var(--color-danger), #dc2626);
    color: #fff;
}

.badge-warning {
    background: linear-gradient(135deg, var(--color-warning), #d97706);
    color: #fff;
}

.badge-info {
    background: linear-gradient(135deg, #06b6d4, var(--color-secondary));
    color: #fff;
}

.badge-secondary {
    background: #e0e6ee;
    color: var(--color-primary);
}

.label {
    padding: 6px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
}

.label-success {
    background: var(--color-success);
    color: #fff;
}

.label-danger {
    background: var(--color-danger);
    color: #fff;
}

.label-warning {
    background: var(--color-warning);
    color: #fff;
}

.label-info {
    background: var(--color-secondary);
    color: #fff;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    display: block;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid var(--gray-border);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
    outline: none;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%230891b2"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 20px;
    padding-left: 40px;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 28px;
    border: 2px solid;
    font-weight: 600;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-color: #34d399;
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #fecaca 100%);
    border-color: #f87171;
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #60a5fa;
    color: #1e40af;
}

/* ============================================
   LIST GROUPS
   ============================================ */

.list-group {
    border-radius: 16px;
    overflow: hidden;
}

.list-group-item {
    border: none;
    border-bottom: 1px solid var(--gray-border);
    padding: 18px 24px;
    transition: all 0.3s ease;
    background: #fff;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ecfeff 100%);
    padding-right: 28px;
}

.list-group-item-action {
    cursor: pointer;
    color: #334155;
    text-decoration: none;
}

.list-group-item-action:hover {
    color: var(--color-secondary);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    padding: 10px 18px;
    border: 2px solid var(--gray-border);
    border-radius: 10px;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    border-color: var(--color-secondary);
    background: #ecfeff;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--color-secondary), #0f4b76);
    border-color: var(--color-secondary);
    color: #fff;
}

/* ============================================
   PROGRESS BARS
   ============================================ */

.progress {
    height: 12px;
    border-radius: 6px;
    background: #e0e6ee;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-secondary), #0f766e);
    transition: width 0.4s ease;
    border-radius: 6px;
}

.progress-bar-success {
    background: linear-gradient(90deg, var(--color-success), #059669);
}

.progress-bar-danger {
    background: linear-gradient(90deg, var(--color-danger), #dc2626);
}

.progress-bar-warning {
    background: linear-gradient(90deg, var(--color-warning), #d97706);
}

/* ============================================
   MODALS
   ============================================ */

.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(45, 60, 88, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2538 100%);
    color: #fff;
    padding: 24px 28px;
    border-radius: 20px 20px 0 0;
    border: none;
}

.modal-title {
    font-weight: 800;
    font-size: 1.3rem;
}

.modal-body {
    padding: 32px 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 2px solid var(--gray-border);
}

/* ============================================
   TABS
   ============================================ */

.nav-tabs {
    border-bottom: 2px solid var(--gray-border);
    margin-bottom: 28px;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 700;
    padding: 14px 24px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

.nav-tabs .nav-link.active {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
    background: transparent;
}

/* ============================================
   SPECIFIC PAGE STYLES
   ============================================ */

/* Support Tickets */
.ticket-status-open {
    color: var(--color-success);
}

.ticket-status-answered {
    color: var(--color-secondary);
}

.ticket-status-closed {
    color: #6c757d;
}

/* Server Status */
.server-status-online {
    color: var(--color-success);
}

.server-status-offline {
    color: var(--color-danger);
}

/* Announcements */
.announcement-card {
    border-right: 4px solid var(--color-secondary);
}

.announcement-card:hover {
    border-right-color: var(--color-accent);
}

/* Downloads */
.download-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 2px solid var(--gray-border);
    border-radius: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.download-item:hover {
    border-color: var(--color-secondary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.15);
}

.download-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-secondary), #0f4b76);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .header-lined {
        padding: 40px 24px;
    }
    
    .header-lined h1 {
        font-size: 1.8rem;
    }
    
    .card-body {
        padding: 24px 20px;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-primary {
    color: var(--color-primary) !important;
}

.text-secondary {
    color: var(--color-secondary) !important;
}

.text-success {
    color: var(--color-success) !important;
}

.text-danger {
    color: var(--color-danger) !important;
}

.text-warning {
    color: var(--color-warning) !important;
}

.bg-primary {
    background: var(--color-primary) !important;
}

.bg-secondary {
    background: var(--color-secondary) !important;
}

.bg-light {
    background: var(--gray-light) !important;
}
