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

:root {
    --background: #fafafa;
    --foreground: #0f0f0f;
    --card: #ffffff;
    --card-foreground: #0f0f0f;
    --popover: #ffffff;
    --popover-foreground: #0f0f0f;
    --primary: #0024ff;
    --primary-foreground: #ffffff;
    --secondary: #f4f4f5;
    --secondary-foreground: #18181b;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --accent: #f4f4f5;
    --accent-foreground: #18181b;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #e4e4e7;
    --input: #e4e4e7;
    --ring: #6366f1;
    --radius: 8px;
    
    /* Professional shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--foreground);
    background: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 24px 0 0 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.main-content {
    margin-left: 280px;
    padding: 32px 40px;
    min-height: 100vh;
    max-width: calc(100vw - 280px);
}

.header {
    margin-left: 280px;
    height: 72px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-sm);
}

/* Sidebar */
.sidebar-header {
    padding: 0 24px;
    margin-bottom: 10px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-title i {
    font-size: 20px;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--muted-foreground);
    text-decoration: none;
    border-radius: 0.5rem;
    margin: 0 0.75rem 0.25rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: translateX(2px);
}

.nav-item.active {
    background: var(--accent);
    color: var(--accent-foreground);
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-counter {
    margin-left: auto;
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    line-height: 1.4;
}

.nav-item.active .nav-counter {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-foreground);
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 0.75rem;
}

/* Components */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease;
}

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

.card-header {
    margin-bottom: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--foreground);
}

.card-description {
    color: var(--muted-foreground);
    font-size: 14px;
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
    min-height: 40px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 32px;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #2f4cff;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #e4e4e7;
}

.btn-destructive {
    background: var(--destructive);
    color: var(--destructive-foreground);
    box-shadow: var(--shadow-sm);
}

.btn-destructive:hover {
    background: #dc2626;
    box-shadow: var(--shadow);
}

.btn-outline {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--foreground);
}

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

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--foreground);
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--foreground);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

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

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.table th {
    background: var(--muted);
    font-weight: 600;
    color: var(--muted-foreground);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background: var(--muted);
}

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

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fed7aa;
    color: #d97706;
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Auth pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ccc url('../img/scrnsht.webp') no-repeat left top / cover;
    padding: 20px;
    position: relative;
}

.auth-container.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container:after {
    content: "";
    background-color: rgba(0, 0, 0, 0.3);
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--foreground);
}

.auth-description {
    color: var(--muted-foreground);
    font-size: 15px;
}

/* Page Headers */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--foreground);
}

.page-description {
    color: var(--muted-foreground);
    font-size: 16px;
}

/* Statistics Cards */
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

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

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--muted-foreground);
    font-weight: 500;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}

.stat-icon.primary {
    background: rgb(99 102 241 / 0.1);
    color: var(--primary);
}

.stat-icon.success {
    background: rgb(34 197 94 / 0.1);
    color: #22c55e;
}

.stat-icon.warning {
    background: rgb(251 191 36 / 0.1);
    color: #fbbf24;
}

.stat-icon.info {
    background: rgb(59 130 246 / 0.1);
    color: #3b82f6;
}

/* Progress bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--muted);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #5855eb);
    transition: width 0.3s ease;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgb(34 197 94 / 0.1);
    color: #15803d;
}

.badge-error {
    background: rgb(239 68 68 / 0.1);
    color: #dc2626;
}

.badge-warning {
    background: rgb(251 191 36 / 0.1);
    color: #d97706;
}

.badge-info {
    background: rgb(59 130 246 / 0.1);
    color: #2563eb;
}

.logo {
    width: 30px;
    height: auto;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 32px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }

.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }

.flex { display: flex; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }

.hidden { display: none; }

.text-primary { color: var(--primary); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
.text-green-600 { color: #16a34a; }
.text-red-600 { color: #dc2626; }
.text-orange-600 { color: #ea580c; }
.text-blue-500 { color: #3b82f6; }
.text-purple-500 { color: #a855f7; }

.bg-muted { background-color: var(--muted); }

.w-full { width: 100%; }

/* Sidebar toggle button - hide on desktop, show on mobile */
#sidebar-toggle {
    display: none;
}

/* Search input */
.search-input {
    background: var(--muted);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.15s ease;
}

.search-input:focus {
    background: var(--card);
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 64px 32px;
}

.empty-state i {
    font-size: 48px;
    color: var(--muted-foreground);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--foreground);
}

.empty-state p {
    color: var(--muted-foreground);
    margin-bottom: 24px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content,
    .header {
        margin-left: 240px;
        max-width: calc(100vw - 240px);
    }
    
    .main-content {
        padding: 24px 32px;
    }
    
    .header {
        padding: 0 32px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Show sidebar toggle button on mobile */
    #sidebar-toggle {
        display: inline-flex;
    }
    
    .main-content,
    .header {
        margin-left: 0;
        max-width: 100vw;
    }
    
    .main-content {
        padding: 20px 16px;
    }
    
    .header {
        padding: 0 16px;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--foreground);
}

.modal-close {
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--muted);
    color: var(--foreground);
}

.modal-body {
    padding: 0 24px 24px;
}

/* Navigation Button Styles */
.nav-button {
    background: none;
    border: none;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.nav-button:hover {
    background: var(--muted);
    color: var(--foreground);
}

/* Plan System Styles */
.sidebar-footer {
    margin-top: auto;
    padding: 16px 24px 24px 24px;
    background: var(--card);
    border-top: 1px solid var(--border);
}

.plan-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
}

.plan-header {
    margin-bottom: 12px;
}

.plan-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--foreground);
    margin: 0;
}

.plan-usage {
    margin-bottom: 12px;
}

.usage-item {
    margin-bottom: 8px;
}

.usage-item:last-child {
    margin-bottom: 0;
}

.usage-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 4px;
}

.usage-count {
    font-weight: 600;
    color: var(--foreground);
}

.usage-bar {
    height: 4px;
    background: var(--muted);
    border-radius: 2px;
    overflow: hidden;
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #4f46e5 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.plan-unlimited {
    text-align: center;
    padding: 8px 0;
}

.plan-actions {
    margin-top: 12px;
}

/* Upgrade Banner */
.upgrade-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.upgrade-banner-content {
    flex: 1;
}

.upgrade-banner-title {
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

.upgrade-banner-text {
    font-size: 14px;
    color: #b45309;
    margin: 0;
}

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

.upgrade-banner .btn {
    font-size: 14px;
    padding: 8px 16px;
}

.upgrade-banner .btn-outline {
    background: transparent;
    border: 1px solid #d97706;
    color: #d97706;
}

.upgrade-banner .btn-outline:hover {
    background: #d97706;
    color: white;
}

/* Plan comparison styles */
.plan-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.plan-option {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.plan-option:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.plan-option.recommended {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.plan-option.recommended::before {
    content: "Anbefalet";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.plan-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.plan-price-display {
    font-size: 18px;
    color: var(--muted-foreground);
    margin-bottom: 24px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.plan-features li i {
    color: #16a34a;
    margin-right: 12px;
    width: 16px;
}

/* Responsive adjustments for sidebar */
@media (max-width: 1024px) {
    .sidebar-footer {
        display: none;
    }
}

/* Inline usage display for mobile/small screens */
.inline-usage {
    display: none;
    background: var(--muted);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .inline-usage {
        display: block;
    }
} 