/* /Users/haskan/YAZILIM /AKGOZLU/admin/css/admin.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --admin-bg: #f8fafc;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #e64a19;
    --primary: #e64a19;
    --primary-hover: #c83c13;
    --primary-light: rgba(230, 74, 25, 0.08);
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #06b6d4;
    --info-light: #ecfeff;
    --font: 'Inter', sans-serif;
    --header-font: 'Outfit', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 8px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 16px -6px rgba(15, 23, 42, 0.05);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background-color: var(--admin-bg);
    color: var(--text-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Auth / Login Page */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #0b0f19;
    background-image: radial-gradient(circle at top right, rgba(230, 74, 25, 0.15), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.8), transparent 50%);
}

.login-card {
    background-color: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 45px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-md);
    color: #ffffff;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo {
    font-family: var(--header-font);
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.login-logo span {
    color: var(--primary);
}

.login-title {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 270px;
    background-color: var(--sidebar-bg);
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 4px 0 25px rgba(15, 23, 42, 0.15);
    transition: var(--transition);
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo {
    font-family: var(--header-font);
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-align: center;
}

.sidebar-logo span {
    color: var(--primary);
}

.sidebar-menu {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px 15px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.sidebar-menu ul {
    list-style: none;
}

.menu-item {
    margin-bottom: 6px;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    gap: 14px;
    color: #cbd5e1;
}

.menu-item i {
    width: 20px;
    font-size: 1.15rem;
    text-align: center;
    transition: var(--transition);
}

.menu-item:hover a {
    background-color: var(--sidebar-hover);
    color: #ffffff;
}

.menu-item:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.menu-item.active a {
    background-color: var(--primary);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(230, 74, 25, 0.3);
}

.menu-item.active i {
    color: #ffffff;
}

/* Main Content Area */
.admin-content {
    flex-grow: 1;
    margin-left: 270px;
    padding: 40px;
    min-width: 0;
    transition: var(--transition);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.page-title {
    font-family: var(--header-font);
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.user-info {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 30px;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.user-info i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Alerts */
.alert {
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    font-weight: 550;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background-color: var(--success-light);
    border-color: #a7f3d0;
    color: #065f46;
}

.alert-danger {
    background-color: var(--danger-light);
    border-color: #fecaca;
    color: #991b1b;
}

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

/* Dashboard Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.widget-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.widget-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(230, 74, 25, 0.2);
}

.widget-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    transition: var(--transition);
}

.widget-card:hover .widget-icon {
    transform: rotate(5deg) scale(1.05);
}

.widget-details h3 {
    font-family: var(--header-font);
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.widget-details p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Tables and Panels */
.panel {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    overflow: hidden;
    transition: var(--transition);
}

.panel:hover {
    box-shadow: var(--shadow-md);
}

.panel-header {
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfd;
}

.panel-title {
    font-family: var(--header-font);
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.panel-body {
    padding: 28px;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr {
    transition: var(--transition);
}

.table tr:hover td {
    background-color: #f8fafc;
}

/* Status Badges */
.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.admin-badge-success {
    background-color: var(--success-light);
    color: #065f46;
}

.admin-badge-danger {
    background-color: var(--danger-light);
    color: #991b1b;
}

.admin-badge-warning {
    background-color: var(--warning-light);
    color: #92400e;
}

.admin-badge-info {
    background-color: var(--info-light);
    color: #155e75;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 74, 25, 0.2);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Forms */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: #1e293b;
    outline: none;
    background-color: #ffffff;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(230, 74, 25, 0.12);
}

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

.form-helper {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    gap: 10px;
    color: #475569;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
}

/* Rich Text Editor / Textarea */
.editor-textarea {
    min-height: 220px;
    resize: vertical;
}

/* Image Upload Preview */
.img-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.img-preview-box {
    position: relative;
    width: 110px;
    height: 110px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.img-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-preview-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--danger);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.img-preview-remove:hover {
    transform: scale(1.1);
    background-color: #dc2626;
}

/* Mobile Navigation Drawer Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #0f172a;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-nav-toggle:hover {
    background-color: #f1f5f9;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    transition: opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Dashboard Layout */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 80px;
    }
    .admin-sidebar .sidebar-logo {
        font-size: 0.9rem;
    }
    .admin-sidebar .sidebar-logo span {
        display: none;
    }
    .admin-sidebar .menu-item span {
        display: none;
    }
    .admin-sidebar .menu-item a {
        justify-content: center;
        padding: 12px;
    }
    .admin-sidebar .menu-item i {
        margin: 0;
        font-size: 1.3rem;
    }
    .admin-content {
        margin-left: 80px;
        padding: 30px 20px;
    }
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
    }
    
    .sidebar-overlay {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        width: 270px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .admin-sidebar .sidebar-logo span {
        display: inline !important;
    }
    
    .admin-sidebar .menu-item span {
        display: inline-block !important;
    }
    
    .admin-sidebar .menu-item a {
        justify-content: flex-start !important;
        padding: 12px 18px !important;
    }
    
    .admin-sidebar .menu-item i {
        margin-right: 12px !important;
        font-size: 1.15rem !important;
    }
    
    .admin-sidebar.open {
        left: 0;
    }

    .admin-content {
        margin-left: 0 !important;
        padding: 20px 12px;
    }

    .content-header {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        padding: 15px 20px;
        margin-bottom: 20px;
    }
    
    .page-title {
        font-size: 1.25rem;
    }

    .user-info {
        margin-left: auto;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .user-info span {
        max-width: 110px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .panel-header {
        padding: 18px 20px;
    }

    .panel-body {
        padding: 20px 15px;
    }

    .table th, .table td {
        padding: 12px 15px;
    }

    /* Grid layout stack on mobile */
    div[style*="display: grid; grid-template-columns: 1.2fr 0.8fr;"],
    div[style*="grid-template-columns: 1.2fr 0.8fr"],
    div[style*="grid-template-columns: 1fr 2fr"],
    div[style*="display: grid; grid-template-columns: 1fr 2fr;"],
    div[style*="grid-template-columns: 1.2fr 0.8fr; gap: 30px;"],
    div[style*="display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px;"],
    div[style*="display: grid; grid-template-columns: 1fr 1fr;"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .btn {
        width: 100%;
        padding: 12px 20px;
    }

    .btn-sm {
        width: auto;
        padding: 8px 12px;
    }

    /* Form styling adjustments for touch inputs */
    .form-control {
        padding: 13px 16px;
        font-size: 1rem;
    }

    .checkbox-label {
        padding: 10px 0;
    }
}
