/* 
 * Admin Panel Main CSS - Jellyfish Beta v2
 * Cloned from app/main.css with admin-specific modifications
 */

/* Import Google Font - DM Sans */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* Import Component Styles */
@import url('./components/admin-header.css');
@import url('./components/admin-sidebar.css');
@import url('./components/admin-tables.css');

/* Reset ve Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #202124;
    line-height: 1.6;
    min-height: 100vh;
    font-size: 14px;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Admin Theme Colors - Different from app */
:root {
    /* Admin-specific dark theme */
    --admin-primary-bg: #1a1a2e;
    --admin-primary-text: #fff;
    --admin-secondary-bg: #16213e;
    --admin-accent: #0f3460;
    --admin-highlight: #e94560;
    --admin-hover-bg: rgba(233, 69, 96, 0.1);
    --admin-cta-bg: #e94560;
    --admin-cta-hover: #d63851;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5em;
    line-height: 1.2;
    font-family: 'DM Sans', sans-serif;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1em;
}

/* =================================================================
   SIDEBAR LAYOUT COMPONENTS
   ================================================================= */

/* Sidebar Styles - Will be detailed in admin-sidebar.css */
.admin-sidebar {
    background-color: var(--admin-primary-bg);
    height: 100vh;
    border-right: 1px solid #2a2a3e;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

/* =================================================================
   MAIN CONTENT LAYOUT COMPONENTS
   ================================================================= */

/* Main Content Layout */
.admin-main-content {
    margin-left: 280px;
    padding: 0 50px 80px 50px;
    background-color: #fff;
    min-height: 100vh;
    overflow-y: auto;
}

/* Content Header with Tabs */
.admin-content-header {
    padding: 24px 82px 0;
    background-color: #fff;
    position: relative;
    margin: 0 -50px;
}

.admin-tabs {
    margin-bottom: 0;
    position: relative;
}

.admin-tabs::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -82px;
    right: -82px;
    height: 1px;
    background-color: #e9ecef;
    z-index: 1;
}

.admin-tab-link {
    display: inline-block;
    padding: 12px 0;
    margin-right: 32px;
    color: #5f6368;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
    z-index: 2;
}

.admin-tab-link.active {
    color: var(--admin-highlight);
    border-bottom-color: var(--admin-highlight);
}

/* Cards and Content Sections */
.admin-content-section {
    padding: 24px 82px;
    background-color: #fff;
    margin: 0 -50px;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-section-title {
    font-size: 20px;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.admin-section-subtitle {
    font-size: 14px;
    color: #5f6368;
    margin: 0;
    font-weight: 400;
}

.admin-btn-primary {
    background: var(--admin-cta-bg);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    text-decoration: none;
}

.admin-btn-primary:hover {
    background: var(--admin-cta-hover);
    color: white;
    text-decoration: none;
}

/* Card Grid Layout */
.admin-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.admin-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.15s ease;
    cursor: pointer;
}

.admin-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    margin: 0;
}

.admin-card-value {
    font-size: 24px;
    font-weight: 600;
    color: #202124;
    margin-bottom: 20px;
}

/* =================================================================
   STATS CARDS - Common across all admin pages
   ================================================================= */

/* Stats Row */
.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.admin-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 20px;
}

.admin-stat-content {
    flex: 1;
}

.admin-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    margin-bottom: 4px;
}

.admin-stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* =================================================================
   FILTER ACCORDION - Common across all admin pages
   ================================================================= */

.admin-filter-accordion {
    margin: 24px 0;
    background: white;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.admin-filter-accordion-toggle {
    width: 100%;
    padding: 16px 20px;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    transition: all 0.2s;
}

.admin-filter-accordion-toggle:hover {
    background: #f9fafb;
}

.admin-filter-accordion-toggle .toggle-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-filter-accordion-toggle .toggle-icon {
    color: #6b7280;
    transition: transform 0.2s;
}

.admin-filter-accordion-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.active-filters-badge {
    background: #3b82f6;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.admin-filter-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: transparent;
}

.admin-filter-accordion-content.show {
    max-height: 500px;
    border-top: none;
}

.admin-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
}

.admin-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-filter-group label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.admin-filter-select,
.admin-filter-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #111827;
    background: white;
    transition: all 0.2s;
}

.admin-filter-select:focus,
.admin-filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 0 20px 20px 20px;
}

.admin-filter-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.admin-filter-btn.primary {
    background: #3b82f6;
    color: white;
}

.admin-filter-btn.primary:hover {
    background: #2563eb;
}

.admin-filter-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.admin-filter-btn.secondary:hover {
    background: #e5e7eb;
}

/* Table styles moved to ./components/admin-tables.css */

/* Legacy table styles removed - now using admin-tables.css */

/* Form Elements */
.admin-form-group {
    margin-bottom: 24px;
}

.admin-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
}

.admin-form-control {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    background-color: #fff;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.admin-form-control:focus {
    outline: none;
    border-color: var(--admin-highlight);
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
}

/* Buttons */
.admin-btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
}

.admin-btn-secondary {
    background: #f8f9fa;
    color: #202124;
    border: 1px solid #e0e0e0;
}

.admin-btn-secondary:hover {
    background: #e8f0fe;
    border-color: var(--admin-highlight);
    color: var(--admin-highlight);
}

/* Utility Classes */
.admin-hidden {
    display: none !important;
}

.admin-text-center {
    text-align: center;
}

.admin-text-left {
    text-align: left;
}

.admin-text-right {
    text-align: right;
}

/* =================================================================
   MODAL COMPONENTS
   ================================================================= */

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-modal.active,
.admin-modal.show {
    display: block;
    opacity: 1;
}

.admin-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.admin-modal-container {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
}

/* Center modal */
.admin-modal-container:not(.admin-modal-right) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
}

/* Right side modal */
.admin-modal-container.admin-modal-right {
    top: 0;
    right: 0;
    height: 100vh;
    width: 500px;
    max-width: 90%;
    max-height: none;
    border-radius: 0;
    animation: slideInRight 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.admin-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.admin-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-modal-title i {
    color: #3b82f6;
}

.admin-modal-close {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.admin-modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.admin-modal-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

/* Modal loading/error states */
.admin-loading-state,
.admin-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.admin-loading-state i {
    font-size: 32px;
    color: #3b82f6;
    margin-bottom: 12px;
}

.admin-error-state i {
    font-size: 32px;
    color: #ef4444;
    margin-bottom: 12px;
}

.admin-error-state p {
    color: #6b7280;
    margin: 4px 0;
}

/* Close modal by clicking overlay */
.admin-modal-overlay {
    cursor: pointer;
}

.admin-modal-container {
    cursor: default;
}

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

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        box-shadow: none;
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
    }
    
    .admin-main-content {
        margin-left: 0;
        padding: 0 16px 40px 16px;
    }
    
    .admin-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .admin-sidebar {
        width: 280px;
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.2);
    }
    
    .admin-main-content {
        margin-left: 0;
        width: 100%;
    }
    
    body.admin-sidebar-open {
        overflow: hidden;
    }
}
