/* ========================================
   Domain Dashboard - Styling
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   Header & Navigation
   ======================================== */

header {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

header h1 {
    color: #667eea;
    font-size: 28px;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 14px;
}

nav {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

nav a, nav button {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav a.active {
    background: #667eea;
    color: white;
}

nav a {
    background: #f0f0f0;
    color: #333;
}

nav a:hover {
    background: #e0e0e0;
}

/* ========================================
   Messages & Alerts
   ======================================== */

.message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ========================================
   Cards & Panels
   ======================================== */

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.card h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* ========================================
   Forms
   ======================================== */

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row.full {
    grid-template-columns: 1fr;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========================================
   Tables
   ======================================== */

.table-container {
    overflow-x: auto;
}

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

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

thead th {
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

tbody td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: #f9f9f9;
}

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

.status-yes {
    background: #d4edda;
    color: #155724;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-no {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-na {
    background: #e2e3e5;
    color: #383d41;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ========================================
   Search & Filter
   ======================================== */

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box input,
.search-box select {
    flex: 1;
    min-width: 200px;
}

.search-box .btn {
    flex: 0 0 auto;
}

/* ========================================
   Detail View
   ======================================== */

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.detail-group {
    margin-bottom: 30px;
}

.detail-group h3 {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    margin: 0;
    flex: 0 0 auto;
        min-width: 150px;
}

.detail-item value {
    color: #333;
    text-align: right;
    flex: 1;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #667eea;
    font-size: 14px;
}

.pagination a:hover {
    background: #667eea;
    color: white;
}

.pagination .active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .detail-item label {
        margin-bottom: 8px;
    }
    .detail-item value {
        text-align: left;
        width: 100%;
    }
}
@media (max-width: 768px) {
    body {
            padding: 10px;
        }
    header {
        padding: 20px;
    }

    header h1 {
        font-size: 22px;
    }

    .card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        }
        .detail-group h3 {
            font-size: 12px;
            margin-bottom: 10px;
        }
        .detail-item {
            display: flex;
            flex-direction: column;
            padding: 8px 0;
        }
        .detail-item label {
            margin-bottom: 6px;
            font-size: 13px;
        }
        .detail-item value {
            text-align: left;
            font-size: 14px;
    }

    .table-container {
        border-radius: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 12px;
        min-width: 600px;
    }

        thead th {
            padding: 8px 6px;
            font-size: 11px;
        }
    tbody td {
        padding: 8px 6px;
            font-size: 12px;
        }
        .status-yes,
        .status-no,
        .status-na {
            padding: 3px 8px;
            font-size: 10px;
    }

    nav {
        flex-direction: column;
    }

    nav a,
    nav button {
        width: 100%;
        text-align: center;
        padding: 10px 15px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input,
    .search-box select {
        width: 100%;
    }
.btn-group {
    flex-direction: column;
}
.btn-group .btn {
    width: 100%;
    justify-content: center;
}
.btn-group form {
    width: 100%;
}
.btn-group form button {
    width: 100%;
}
}
@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    .container {
        max-width: 100%;
    }
    header {
        padding: 15px;
        margin-bottom: 15px;
    }
    header h1 {
        font-size: 18px;
        margin-bottom: 5px;
    }
    header p {
        font-size: 12px;
    }
    .card {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 6px;
    }
    .card h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    .detail-group h3 {
        font-size: 11px;
        margin-bottom: 8px;
    }
    .detail-item {
        padding: 6px 0;
        border-bottom: 1px dotted #f0f0f0;
    }
    .detail-item label {
        font-size: 12px;
        margin-bottom: 4px;
        font-weight: 600;
    }
    .detail-item value {
        font-size: 12px;
    }
    table {
        font-size: 10px;
        min-width: 100%;
    }
    thead th {
        padding: 6px 4px;
        font-size: 10px;
    }
    tbody td {
        padding: 6px 4px;
        font-size: 10px;
    }
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    .btn-small {
        padding: 6px 12px;
        font-size: 11px;
    }
}

/* ========================================
   Loading & Animations
   ======================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}
