/* 
 * Admin Panel CSS
 * Kurumsal Giyim E-Ticaret
 */

:root {
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --secondary: #3498db;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --gray-light: #bdc3c7;
    --white: #ffffff;
    
    --sidebar-width: 250px;
    --topbar-height: 60px;
    
    --font-family: 'Poppins', sans-serif;
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.8rem;
    --font-size-base: 0.875rem;
    --font-size-md: 0.95rem;
    --font-size-lg: 1.1rem;
    
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 6px;
    --radius-md: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background: #f5f6fa;
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-dark);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--font-size-md);
    font-weight: 600;
}

.sidebar-logo i {
    font-size: var(--font-size-lg);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: var(--font-size-lg);
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 15px 0;
}

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

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
    font-size: var(--font-size-sm);
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.sidebar-nav li a i {
    width: 20px;
    text-align: center;
}

.sidebar-nav li a .badge {
    margin-left: auto;
    background: var(--danger);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--font-size-xs);
}

.sidebar-nav .nav-header {
    padding: 15px 20px 8px;
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.sidebar-footer a:hover {
    color: var(--white);
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--white);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    color: var(--dark);
    cursor: pointer;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--font-size-sm);
}

.home-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--light);
    color: var(--gray-dark, #374151);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.home-link:hover {
    background: var(--primary);
    color: var(--white);
}

.logout-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 50%;
    color: var(--gray);
    transition: var(--transition);
}

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

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: var(--font-size-md);
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: var(--font-size-lg);
}

.stat-icon.blue { background: rgba(52, 152, 219, 0.1); color: var(--secondary); }
.stat-icon.green { background: rgba(39, 174, 96, 0.1); color: var(--success); }
.stat-icon.orange { background: rgba(243, 156, 18, 0.1); color: var(--warning); }
.stat-icon.red { background: rgba(231, 76, 60, 0.1); color: var(--danger); }

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

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

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

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

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--light);
    font-size: var(--font-size-sm);
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
}

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

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-text {
    font-size: var(--font-size-xs);
    color: var(--gray);
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-size-xs);
}

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

.btn-primary:hover {
    background: #2980b9;
}

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

.btn-success:hover {
    background: #219a52;
}

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

.btn-danger:hover {
    background: #c0392b;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-light);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--light);
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.action-btn.edit {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary);
}

.action-btn.edit:hover {
    background: var(--secondary);
    color: var(--white);
}

.action-btn.delete {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

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

.action-btn.view {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.action-btn.view:hover {
    background: var(--success);
    color: var(--white);
}

/* Status Badge */
.status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.status.active {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success);
}

.status.inactive {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-size: var(--font-size-sm);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Image Upload */
.image-upload {
    border: 2px dashed var(--gray-light);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.image-upload:hover {
    border-color: var(--secondary);
}

.image-upload i {
    font-size: 2rem;
    color: var(--gray);
    margin-bottom: 10px;
}

.image-upload p {
    font-size: var(--font-size-sm);
    color: var(--gray);
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.image-preview-item .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: var(--font-size-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    transition: var(--transition);
}

.pagination a {
    background: var(--white);
    border: 1px solid var(--gray-light);
    color: var(--dark);
}

.pagination a:hover,
.pagination .active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: var(--font-size-md);
    margin-bottom: 5px;
    color: var(--dark);
}

/* Footer */
.admin-footer {
    padding: 15px 20px;
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--gray);
    border-top: 1px solid var(--light);
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 40px;
}

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

.login-header h1 {
    font-size: var(--font-size-lg);
    margin-bottom: 5px;
}

.login-header p {
    font-size: var(--font-size-sm);
    color: var(--gray);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn {
    width: 100%;
    padding: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: -100%;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Checkbox & Switch */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check label {
    margin: 0;
    cursor: pointer;
}

/* File Input */
input[type="file"] {
    padding: 8px;
}

/* Editor Placeholder */
.editor-placeholder {
    min-height: 200px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    padding: 15px;
}
