/* ServiceSign Admin Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f7fafc; 
    color: #1a202c;
    min-height: 100vh;
}

/* Header */
.admin-header { 
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white; 
    padding: 16px 32px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.header-top h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

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

.btn-logout { 
    padding: 8px 20px; 
    border: 0; 
    background: rgba(255,255,255,0.15);
    color: white; 
    border-radius: 8px; 
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

/* Navigation */
.admin-nav { 
    display: flex; 
    gap: 4px;
    flex-wrap: wrap;
}

.admin-nav a { 
    color: rgba(255,255,255,0.8); 
    text-decoration: none; 
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.admin-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-nav a.active { 
    background: rgba(255,255,255,0.2);
    color: white; 
    font-weight: 600;
}

/* Main Content */
main { 
    max-width: 1200px; 
    margin: 32px auto; 
    padding: 0 32px;
}

/* Cards */
.card { 
    background: white;
    border-radius: 12px; 
    padding: 28px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.card-header h2 {
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.card h2 {
    color: #1e293b;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.card h3 {
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Buttons */
.btn, button, .button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary, button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover, button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary, .button.secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover, .button.secondary:hover {
    background: #cbd5e0;
}

.btn-danger, .button.danger, button.danger {
    background: #fc8181;
    color: white;
}

.btn-danger:hover, .button.danger:hover, button.danger:hover {
    background: #f56565;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

label {
    display: block;
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.error-input {
    border-color: #fc8181;
}

.error-message {
    color: #c53030;
    font-size: 13px;
    margin-top: 6px;
}

/* Messages */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-success, .success {
    background: #c6f6d5;
    color: #2f855a;
    border-color: #2f855a;
}

.alert-error, .error {
    background: #fed7d7;
    color: #c53030;
    border-color: #c53030;
}

.alert-warning {
    background: #feebc8;
    color: #c05621;
    border-color: #dd6b20;
}

.alert-info {
    background: #bee3f8;
    color: #2c5282;
    border-color: #3182ce;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f7fafc;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    color: #2d3748;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 14px;
    vertical-align: top;
}

tr:hover {
    background: #f7fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: #c6f6d5; color: #2f855a; }
.badge-warning { background: #feebc8; color: #c05621; }
.badge-info { background: #bee3f8; color: #2c5282; }
.badge-danger { background: #fed7d7; color: #c53030; }
.badge-secondary { background: #e2e8f0; color: #4a5568; }

/* Module Cards */
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.module-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: block;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.module-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.module-title {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.module-desc {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.stat-label {
    color: #718096;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

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

/* Utilities */
.text-muted, .muted { color: #718096; }
.text-sm { font-size: 13px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Filter Section */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    color: white;
    margin-bottom: 32px;
}

.welcome-card h2 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 700;
}

.welcome-card p {
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.6;
}

.user-info-card {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 14px;
    opacity: 0.9;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #2d3748;
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: #718096;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    main { padding: 0 16px; }
    .admin-header { padding: 16px; }
    .card { padding: 20px; }
    .header-top { flex-direction: column; gap: 16px; align-items: flex-start; }
    .admin-nav { overflow-x: auto; white-space: nowrap; }
    .filter-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
