/*
Theme Name: Kando Modern
Theme URI: https://example.com/kando-modern
Author: Custom Development
Author URI: https://example.com
Description: قالب مدرن و کاربرپسند با داشبورد زیبا - الهام‌گرفته از کندوپنل (نسخه ۲ - پنل کامل سرویس، تیکت AI، درگاه، پیامک)
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kando-modern
Tags: rtl-language-support, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog, e-commerce
*/

/* ============================================
   Reset & Base
============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --transition: all 0.25s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', system-ui, -apple-system, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ============================================
   Typography
============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

/* ============================================
   Container
============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

/* ============================================
   Buttons
============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

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

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

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

.btn-sm {
    padding: 7px 14px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
}

/* ============================================
   Header
============================================ */
.site-header {
    background: #fff;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.main-nav ul {
    display: flex;
    gap: 8px;
    align-items: center;
}

.main-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--gray-600);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ============================================
   Hero Section
============================================ */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 40%, #0ea5e9 100%);
    color: #fff;
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    color: #fff;
    font-size: 2.6rem;
    margin-bottom: 18px;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.hero .btn-outline {
    border-color: rgba(255,255,255,0.6);
    color: #fff;
}

.hero .btn-outline:hover {
    background: #fff;
    color: var(--primary);
}

/* ============================================
   Features
============================================ */
.features {
    padding: 70px 0;
    margin-top: -50px;
    position: relative;
    z-index: 5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 18px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

/* ============================================
   Dashboard Layout
============================================ */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
}

.dashboard-sidebar {
    width: 260px;
    background: var(--dark);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.sidebar-user {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
}

.sidebar-user .avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.sidebar-user h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 4px;
}

.sidebar-user p {
    color: var(--gray-400);
    font-size: 0.85rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-300);
    font-weight: 500;
    transition: var(--transition);
    border-right: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
    border-right-color: var(--primary);
}

.sidebar-menu .icon {
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}

.dashboard-content {
    flex: 1;
    padding: 28px;
    background: var(--gray-50);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-header h1 {
    font-size: 1.6rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.purple { background: rgba(99,102,241,0.12); color: var(--primary); }
.stat-icon.blue { background: rgba(14,165,233,0.12); color: var(--secondary); }
.stat-icon.green { background: rgba(16,185,129,0.12); color: var(--success); }
.stat-icon.orange { background: rgba(245,158,11,0.12); color: var(--warning); }

.stat-info h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Content Cards */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1.1rem;
}

.card-body {
    padding: 22px;
}

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

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

th, td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--gray-100);
}

th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.9rem;
}

td {
    font-size: 0.95rem;
}

tr:hover td {
    background: var(--gray-50);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success { background: rgba(16,185,129,0.12); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-danger { background: rgba(239,68,68,0.12); color: var(--danger); }
.badge-info { background: rgba(14,165,233,0.12); color: var(--secondary); }

/* ============================================
   Auth Pages (Login / Register)
============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #0ea5e9 100%);
    padding: 30px 20px;
}

.auth-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 420px;
    padding: 40px 36px;
}

.auth-box .logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-box .logo span {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 8px;
}

.auth-box .subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--gray-50);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}

.auth-box .btn {
    width: 100%;
    margin-top: 8px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Footer
============================================ */
.site-footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 50px 0 25px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 36px;
    margin-bottom: 36px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 18px;
    font-size: 1.05rem;
}

.footer-col p,
.footer-col a {
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.9;
}

.footer-col a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 22px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============================================
   Responsive
============================================ */
@media (max-width: 992px) {
    .dashboard-sidebar {
        position: fixed;
        right: -280px;
        top: 70px;
        z-index: 999;
        transition: right 0.3s ease;
        height: calc(100vh - 70px);
    }

    .dashboard-sidebar.open {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.9rem;
    }

    .dashboard-content {
        padding: 18px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .header-actions .btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .auth-box {
        padding: 30px 22px;
    }
}

/* Utility */
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-2 { gap: 12px; }
.w-100 { width: 100%; }
