/* tracker/base.css */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --bg-color: #f8f9fa;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background: var(--bg-color);
    color: var(--text-color);
}

nav {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav .brand {
    font-size: 1.5rem;
    font-weight: bold;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-color);
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 2rem auto;
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

h1, h2 {
    color: var(--primary-color);
    margin-top: 0;
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 5px solid var(--success-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 5px solid var(--error-color);
}

.alert-info {
    background: #cce5ff;
    color: #004085;
    border-left: 5px solid var(--accent-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

table th, table td {
    border-bottom: 1px solid #eee;
    padding: 1rem;
    text-align: left;
}

table th {
    background: #fdfdfd;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

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

form > div {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

input, select {
    padding: 0.8rem;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: var(--accent-color);
    outline: none;
}

button {
    padding: 0.8rem 1.8rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.1s;
}

button:hover {
    background: var(--secondary-color);
}

button:active {
    transform: translateY(1px);
}

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

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-card small {
    display: block;
    color: #777;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    color: var(--primary-color);
}

.logout-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    margin-left: 1.5rem;
    font-family: inherit;
}

.logout-btn:hover {
    color: var(--accent-color);
}

/* Custom Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: pre-wrap;
    width: max-content;
    max-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease-in-out;
    z-index: 1000;
    pointer-events: none;
    line-height: 1.4;
    text-align: center;
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}
