/* Developer Portal - Shared Styles */

/* Base Styles */
* { 
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale; 
}

body { 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
    background: #0b0f1a; 
    color: #e2e8f0; 
    margin: 0; 
    font-size: 16px;
    line-height: 1.6;
}

/* Container & Layout */
.dev-container { 
    max-width: 1200px; 
    margin: 60px auto 0; 
    padding: 56px; 
    background: rgba(12, 19, 31, 0.95); 
    border-radius: 20px; 
    box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,0.05); 
    backdrop-filter: blur(10px);
}

.dev-header { 
    position: relative; 
    display: flex; 
    flex-direction: column; 
    margin-bottom: 40px; 
    gap: 16px; 
    text-align: center; 
}

.dev-logo { 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 16px; 
    text-decoration: none; 
}

.dev-logo img { 
    width: 240px; 
    max-width: 240px; 
    height: auto; 
}

.dev-logo-caption { 
    font-size: 24px; 
    color: #94a3b8; 
    letter-spacing: 0.05em; 
    text-transform: uppercase; 
    font-weight: 600; 
    margin-top: 8px; 
}

.dev-logout-link { 
    position: absolute; 
    top: 0; 
    right: 0; 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    color: #cbd5e1; 
    text-decoration: none; 
    font-weight: 500; 
    font-size: 15px; 
    padding: 10px 16px; 
    border-radius: 8px;
    transition: all .2s ease;
}

.dev-logout-link:hover { 
    color: #fff; 
    background: rgba(255,255,255,0.08);
}

/* Forms */
.dev-field { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    margin-bottom: 24px; 
}

.dev-field label { 
    font-size: 15px; 
    font-weight: 600; 
    text-transform: none; 
    letter-spacing: 0; 
    color: #cbd5e1; 
}

.dev-field input, .dev-field select { 
    padding: 14px 18px; 
    border: 1px solid rgba(255,255,255,0.15); 
    border-radius: 10px; 
    background: rgba(17,25,40,0.9); 
    color: #fff; 
    font-size: 16px;
    font-family: inherit;
    transition: all .2s ease;
}

.dev-field input:focus, .dev-field select:focus { 
    outline: none; 
    border-color: #4f8bff; 
    box-shadow: 0 0 0 3px rgba(79,139,255,0.15);
    background: rgba(17,25,40,1);
}

/* Buttons */
.dev-button { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    padding: 14px 28px; 
    border-radius: 10px; 
    background: linear-gradient(135deg, #5393FD, #4C65FD); 
    color: #fff; 
    font-weight: 600; 
    font-size: 16px;
    border: none; 
    cursor: pointer; 
    transition: all .2s ease;
    box-shadow: 0 4px 12px rgba(79,139,255,0.3);
}

.dev-button.secondary { 
    background: rgba(255,255,255,0.1); 
    box-shadow: none;
}

.dev-button:hover { 
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79,139,255,0.4);
}

.dev-button.secondary:hover {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Messages */
.dev-flash { 
    margin-bottom: 24px; 
    padding: 16px 20px; 
    border-radius: 10px; 
    background: rgba(56,189,248,0.2); 
    color: #bae6fd; 
    font-weight: 500; 
    font-size: 15px;
    border: 1px solid rgba(56,189,248,0.3);
}

.dev-error { 
    margin-bottom: 20px; 
    padding: 16px 20px; 
    border-radius: 10px; 
    background: rgba(248,113,113,0.2); 
    color: #fecaca; 
    font-size: 15px;
    border: 1px solid rgba(248,113,113,0.3);
}

/* Cards */
.plan-card { 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: 14px; 
    padding: 24px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    background: rgba(13,20,33,0.9); 
    transition: all .2s ease;
}

.plan-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.plan-card.active { 
    border-color: #4f8bff; 
    box-shadow: 0 0 0 1px rgba(79,139,255,0.4), 0 8px 24px rgba(79,139,255,0.2); 
}

.plan-grid { 
    display: grid; 
    gap: 20px; 
}

/* Navigation */
.dev-header-divider { 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    margin-bottom: 24px; 
}

.dev-nav { 
    display: flex; 
    align-items: center; 
    justify-content: flex-start; 
    margin-bottom: 16px; 
    width: 100%; 
}

.dev-tabs { 
    display: flex; 
    gap: 12px; 
    flex-wrap: wrap; 
    justify-content: flex-start; 
}

.dev-tabs a { 
    color: #94a3b8; 
    text-decoration: none; 
    font-weight: 500; 
    font-size: 16px;
    padding: 10px 20px; 
    border-radius: 10px; 
    transition: all .2s ease;
}

.dev-tabs a:hover { 
    color: #cbd5e1;
    background: rgba(255,255,255,0.05);
}

.dev-tabs a.active { 
    background: rgba(79,139,255,0.25); 
    color: #ffffff; 
    font-weight: 600;
}

.dev-tabs a.admin-tab { 
    color: #f87171; 
}

.dev-tabs a.admin-tab:hover { 
    background: rgba(248,113,113,0.2); 
    color: #fff; 
}

.dev-tabs a.admin-tab.active { 
    background: rgba(248,113,113,0.3); 
    color: #fff; 
}

.dev-tabs-divider { 
    border-bottom: 1px solid rgba(255,255,255,0.08); 
    margin-bottom: 32px; 
}

/* Auth Container */
.dev-auth-container { 
    max-width: 480px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    gap: 28px; 
}

/* Usage Chart */
.usage-chart { 
    position: relative; 
    height: 140px; 
    border-radius: 14px; 
    background: linear-gradient(180deg, rgba(83,147,253,0.15), rgba(12,19,31,0.7)); 
    border: 1px solid rgba(79,139,255,0.3); 
    overflow: hidden; 
    margin-bottom: 20px; 
}

.usage-chart-grid { 
    position: absolute; 
    inset: 0; 
    background-image: linear-gradient(transparent 90%, rgba(255,255,255,0.06) 90%), linear-gradient(90deg, transparent 90%, rgba(255,255,255,0.05) 90%); 
    background-size: 100% 20px, 40px 100%; 
}

.usage-chart-fill { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 0; 
    height: 100%; 
    background: linear-gradient(135deg,#5393FD,#4C65FD); 
    transition: width .4s ease; 
}

.usage-chart-label { 
    position: absolute; 
    bottom: 12px; 
    right: 16px; 
    font-size: 14px; 
    color: #cbd5e1; 
    font-weight: 600; 
}

/* Footer */
.dev-footer { 
    max-width: 800px; 
    margin: 56px auto 32px; 
    padding: 24px; 
    font-size: 14px; 
    color: rgba(255,255,255,0.6); 
    text-align: center; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    letter-spacing: 0.02em; 
}

.dev-footer a {
    color: #cbd5e1;
    transition: color .2s ease;
}

.dev-footer a:hover {
    color: #fff;
}

/* ============================================
   ADMIN STYLES
   ============================================ */

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

.admin-stat-card {
    background: rgba(13,20,33,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all .2s ease;
}

.admin-stat-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.admin-stat-label {
    font-size: 14px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.admin-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.admin-chart-container {
    background: rgba(13,20,33,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 28px;
}

.admin-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 28px;
    margin-bottom: 28px;
}

.admin-chart-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.admin-developers-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(13,20,33,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    overflow: hidden;
}

.admin-developers-table thead {
    background: rgba(17,25,40,0.95);
}

.admin-developers-table th {
    padding: 16px 18px;
    text-align: left;
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-developers-table td {
    padding: 16px 18px;
    font-size: 14px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-developers-table tbody tr:hover {
    background: rgba(79,139,255,0.1);
}

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

.admin-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-status-active { 
    background: rgba(52,211,153,0.2); 
    color: #34d399; 
}

.admin-status-pending { 
    background: rgba(250,204,21,0.2); 
    color: #facc15; 
}

.admin-status-past_due { 
    background: rgba(248,113,113,0.2); 
    color: #f87171; 
}

.admin-status-canceled { 
    background: rgba(148,163,184,0.2); 
    color: #cbd5e1; 
}

.admin-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(79,139,255,0.2);
    color: #4f8bff;
}

.admin-usage-bar-fill {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.admin-usage-bar-progress {
    height: 100%;
    background: linear-gradient(90deg, #5393FD, #4C65FD);
    transition: width 0.3s ease;
}

.admin-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

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

.admin-filter-label {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-filter-select {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    background: rgba(17,25,40,0.9);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    min-width: 160px;
    transition: all .2s ease;
}

.admin-filter-select:focus {
    outline: none;
    border-color: #4f8bff;
    box-shadow: 0 0 0 3px rgba(79,139,255,0.15);
}

.admin-sort-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-sort-button {
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: rgba(17,25,40,0.9);
    color: #94a3b8;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-sort-button:hover {
    background: rgba(79,139,255,0.2);
    border-color: rgba(79,139,255,0.4);
    color: #fff;
}

.admin-sort-button.active {
    background: rgba(79,139,255,0.3);
    border-color: #4f8bff;
    color: #fff;
}

/* ============================================
   DOCS STYLES
   ============================================ */

.dev-docs-layout { 
    display: flex; 
    gap: 32px; 
    flex-wrap: wrap; 
}

.dev-docs-nav { 
    flex: 0 0 200px; 
    min-width: 180px; 
}

.dev-docs-nav-inner { 
    position: sticky; 
    top: 24px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    padding: 20px; 
    border-radius: 14px; 
    background: rgba(13,20,33,0.9); 
    border: 1px solid rgba(79,139,255,0.25); 
}

.dev-docs-nav-title { 
    font-size: 15px; 
    font-weight: 700; 
    letter-spacing: 0.05em; 
    text-transform: uppercase; 
    color: #94a3b8; 
    margin-bottom: 4px;
}

.dev-docs-nav-link { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 14px; 
    border-radius: 10px; 
    background: transparent; 
    border: none; 
    color: #cbd5e1; 
    font-size: 15px; 
    text-align: left; 
    cursor: pointer; 
    transition: all .2s ease; 
    font-family: inherit;
}

.dev-docs-nav-link:hover { 
    background: rgba(79,139,255,0.15); 
    color: #fff;
}

.dev-docs-nav-link.active { 
    background: rgba(79,139,255,0.3); 
    color: #ffffff; 
    font-weight: 600; 
}

.dev-docs-panel { 
    display: none; 
    flex-direction: column; 
    gap: 20px; 
    padding-bottom: 36px; 
    border-bottom: 1px solid rgba(79,139,255,0.25); 
}

.dev-docs-panel.active { 
    display: flex; 
}

.dev-docs-panels { 
    flex: 1; 
    min-width: 300px; 
    display: flex; 
    flex-direction: column; 
    gap: 28px; 
}

.dev-docs-section-title { 
    font-size: 20px; 
    font-weight: 700; 
    letter-spacing: 0.02em; 
    color: #fff;
    margin: 0;
}

.dev-docs-subheader { 
    font-size: 15px; 
    font-weight: 600; 
    letter-spacing: 0.05em; 
    text-transform: uppercase; 
    color: #94a3b8; 
}

.dev-code-block { 
    background: rgba(0,0,0,0.5); 
    border-radius: 10px; 
    padding: 20px; 
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; 
    font-size: 14px; 
    line-height: 1.7; 
    border: 1px solid rgba(79,139,255,0.3); 
    margin-top: -1px; 
    overflow-x: auto; 
    white-space: pre-wrap; 
    word-wrap: break-word; 
    color: #e2e8f0;
}

.dev-code-toggle { 
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    margin-bottom: -2px; 
}

.dev-code-toggle button { 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 16px; 
    border-radius: 10px 10px 0 0; 
    border: 1px solid rgba(79,139,255,0.25); 
    border-bottom: none; 
    background: rgba(13,20,33,0.9); 
    color: #cbd5e1; 
    font-size: 14px; 
    font-family: inherit;
    cursor: pointer; 
    transition: all .2s ease; 
}

.dev-code-toggle button:hover {
    background: rgba(79,139,255,0.15);
    color: #fff;
}

.dev-code-toggle button.active { 
    background: rgba(0,0,0,0.5); 
    color: #ffffff; 
    border-color: rgba(79,139,255,0.6); 
}

.dev-lang-icon { 
    width: 22px; 
    height: 22px; 
    border-radius: 6px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 12px; 
    font-weight: 700; 
    color: #0b0f1a; 
}

.dev-lang-curl { background: #2dd4bf; }
.dev-lang-js { background: #facc15; }
.dev-lang-node { background: #22c55e; }
.dev-lang-ruby { background: #f43f5e; color: #fff; }
.dev-lang-php { background: #60a5fa; color: #fff; }
.dev-lang-python { background: #a855f7; color: #fff; }

.dev-docs-table { 
    width: 100%; 
    border-collapse: collapse; 
    border-radius: 12px; 
    overflow: hidden; 
    border: 1px solid rgba(79,139,255,0.25); 
}

.dev-docs-table th, .dev-docs-table td { 
    padding: 14px 16px; 
    text-align: left; 
    font-size: 14px; 
}

.dev-docs-table th { 
    background: rgba(79,139,255,0.15); 
    color: #cbd5e1; 
    letter-spacing: 0.04em; 
    text-transform: uppercase; 
    font-weight: 600;
}

.dev-docs-table tr:nth-child(even) { 
    background: rgba(15,23,42,0.6); 
}

.dev-docs-table tr:nth-child(odd) { 
    background: rgba(12,19,31,0.85); 
}

/* ============================================
   MODAL STYLES
   ============================================ */

.dev-modal { 
    position: fixed; 
    inset: 0; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    background: rgba(0,0,0,0.7); 
    z-index: 1000; 
    padding: 24px; 
    backdrop-filter: blur(4px);
}

.dev-modal.active { 
    display: flex; 
}

.dev-modal-card { 
    background: rgba(12,19,31,0.98); 
    border-radius: 16px; 
    padding: 28px; 
    width: 100%; 
    max-width: 440px; 
    box-shadow: 0 24px 60px rgba(0,0,0,0.6); 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    border: 1px solid rgba(255,255,255,0.1);
}

.dev-modal-card h3 { 
    margin: 0; 
    font-size: 20px; 
    font-weight: 700; 
    color: #fff; 
}

.dev-modal-actions { 
    display: flex; 
    justify-content: flex-end; 
    gap: 12px; 
}

.dev-modal-close { 
    background: transparent; 
    border: none; 
    color: #94a3b8; 
    font-size: 15px; 
    cursor: pointer; 
    padding: 8px;
    border-radius: 8px;
    transition: all .2s ease;
    font-family: inherit;
}

.dev-modal-close:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.dev-key-edit { 
    background: transparent; 
    border: none; 
    padding: 4px; 
    font-size: 16px; 
    color: #60a5ff; 
    cursor: pointer; 
    transition: all .2s ease; 
    display: inline-flex; 
    align-items: center; 
    border-radius: 6px;
}

.dev-key-edit:hover { 
    color: #93c5fd; 
    background: rgba(96,165,250,0.1);
}

.dev-key-edit svg { 
    width: 18px; 
    height: 18px; 
}

.dev-key-edit--disabled { 
    color: #475569; 
    cursor: default; 
}

.dev-key-edit--disabled:hover { 
    color: #475569; 
    background: transparent;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 640px) { 
    .plan-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
}

@media (min-width: 1040px) { 
    .plan-grid { 
        grid-template-columns: repeat(3, 1fr); 
    } 
}

@media (max-width: 768px) {
    .admin-charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dev-docs-layout { 
        flex-direction: column; 
        gap: 20px; 
    }
    
    .dev-docs-nav { 
        display: none; 
    }
    
    .dev-docs-panel { 
        display: flex !important; 
        padding-bottom: 32px; 
    }
    
    .dev-docs-panels { 
        gap: 24px; 
    }
}

@media (max-width: 640px) {
    body { 
        font-size: 15px; 
    }
    
    .dev-container { 
        margin: 24px auto 0; 
        padding: 32px; 
    }
    
    .dev-logo img { 
        width: 200px; 
    }
    
    .dev-logo-caption { 
        font-size: 18px; 
        letter-spacing: 0.08em; 
    }
    
    .dev-tabs { 
        justify-content: flex-start; 
        gap: 8px;
    }
    
    .dev-tabs a {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .usage-chart { 
        height: 120px; 
    }
    
    .dev-button {
        font-size: 15px;
        padding: 12px 24px;
    }
    
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Dashboard specific styles */
.dev-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .dev-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

