/* Modern CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Saira', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.4;
}

/* Container for all content */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styling */
h1, h2 {
    color: #e5e7eb;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 300;
    font-family: 'Saira', sans-serif;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #f76d3c;
}

h2 {
    font-size: 1.3rem;
    color: #e5e7eb;
}

/* Card-based design for forms and content */
.card {
    background: #2a2a2a;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #404040;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Login form specific styling */
#login-form {
    max-width: 350px;
    margin: 1rem auto;
}

/* Form styling */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

label {
    font-weight: 400;
    color: #b0b0b0;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: normal;
}

input[type="text"], 
input[type="password"], 
input[type="email"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid #555;
    border-radius: 2px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    background: #333;
    color: #e5e7eb;
    font-family: 'Saira', sans-serif;
}

input[type="text"]:focus, 
input[type="password"]:focus, 
input[type="email"]:focus {
    outline: none;
    border-color: #f76d3c;
    background: #3a3a3a;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row;
}

.checkbox-group label {
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    margin: 0;
}

input[type="checkbox"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

/* Button styling */
button {
    padding: 0.6rem 1.2rem;
    background: transparent;
    color: #f76d3c;
    border: 1px solid #f76d3c;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Saira Condensed', 'Saira', sans-serif;
}

button:hover {
    background: #f76d3c;
    color: white;
}

button:active {
    transform: none;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Table styling for data display */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

th, td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid #404040;
    font-size: 0.8rem;
}

th {
    background: #f76d3c;
    color: white;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    font-family: 'Saira Condensed', 'Saira', sans-serif;
}

td {
    color: #e5e7eb;
}

tr:nth-child(even) {
    background-color: #333;
}

tr:hover {
    background-color: #3a3a3a;
    transition: background-color 0.3s ease;
}

/* Section headers in tables */
th[colspan] {
    background: #555;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.8rem;
}

/* Search form styling */
#search-form {
    max-width: 450px;
    margin: 0 auto;
}

/* Results container */
#rig-info-container {
    margin-top: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 8px;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.4rem 0.3rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 0.75rem;
    }
    
    button {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    table {
        font-size: 0.7rem;
    }
}

/* Alert styling */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

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

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

.alert.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User info display */
.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.info-card {
    background: #2a2a2a;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-left: 3px solid #f76d3c;
}

.info-card h3 {
    color: #f76d3c;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-family: 'Saira', sans-serif;
    font-weight: 300;
}
