:root {
    --primary: #032a56;
    --primary-light: #0a468d;
    --accent: #00d2ff;
    --bg: #f4f7fa;
    --card: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --danger: #ff7675;
    --success: #55efc4;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Auth Pages */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #001a33 100%);
}

.auth-card {
    background: var(--card);
    padding: 3rem;
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    text-align: center;
}

.auth-card img {
    width: 150px;
    margin-bottom: 2rem;
}

.auth-card h2 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #edf2f7;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(3, 42, 86, 0.1);
}

.btn {
    cursor: pointer;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--primary);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar .logo {
    width: 100%;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 2rem;
}

.nav-item {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(255,255,255,0.1);
}

.main-content {
    flex: 1;
    padding: 2rem 3rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
}

.data-table-container {
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

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

th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--bg);
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--bg);
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active { background: #e6fffa; color: #38b2ac; }
.status-expired { background: #fff5f5; color: #f56565; }

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.chart-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    padding: 2rem;
}
.badge {
    background: #e2e8f0;
    color: #475569;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

pre {
    background: #f8fafc;
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', Courier, monospace;
}
.url-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}

.url-cell a {
    color: var(--primary);
    text-decoration: none;
}

.url-cell a:hover {
    text-decoration: underline;
}

.btn-edit {
    background: #f0f7ff;
    color: #032a56;
    padding: 0.4rem;
}

.btn-edit:hover {
    background: #e0efff;
}

.btn-delete {
    background: #fff5f5;
    color: #c53030;
    padding: 0.4rem;
}

.btn-delete:hover {
    background: #fed7d7;
}
