/* Variables */
:root {
    --primary: #4f46e5;
    --secondary: #10b981;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border-radius: 0.75rem;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --transition: 0.3s;
}

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

@font-face {
    font-family: 'SF Pro Display';
    font-style: normal;
    font-weight: 400;
    src: local('SF Pro Display'), local('SFProDisplay-Regular');
}
@font-face {
    font-family: 'SF Pro Text';
    font-style: normal;
    font-weight: 400;
    src: local('SF Pro Text'), local('SFProText-Regular');
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--secondary);
}

header {
    background-color: #ffffff;
    background-image: none;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #0d141c;
    font-weight: 600;
    font-size: 1.75rem;
}

nav a {
    color: rgba(255,255,255,0.85);
    margin-left: 1rem;
    font-weight: 450;
}

nav a:hover {
    color: #fff;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Table Style */
.wells-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.wells-table thead {
    background: var(--primary);
}

.wells-table th {
    color: #fff;
    text-align: left;
    padding: 1rem;
    font-weight: 500;
}

.wells-table tbody tr {
    background: var(--card-bg);
    transition: background var(--transition);
}

.wells-table tbody tr:nth-child(even) {
    background: #f3f4f6;
}

.wells-table tbody tr:hover {
    background: #e5e7eb;
}

.wells-table td {
    padding: 1rem;
    font-size: 0.95rem;
    color: var(--text);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--secondary);
    color: #fff;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: background var(--transition);
}

.btn:hover {
    background: #0ea5e9;
}

/* Detail Page Sections */
.details-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.details-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.details-list {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 1rem;
}

.details-list p {
    font-size: 0.95rem;
    color: var(--text);
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        margin-top: 0.5rem;
    }
    nav a {
        margin: 0.5rem 0;
    }
    .details-list {
        grid-template-columns: 1fr;
    }
}

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* Navigation */
.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}
.logo {
    display: inline-block;
}
.logo-img {
    height: 50px;
    width: auto;
}
.nav-toggle {
    display: none;
}
.nav-toggle-label {
    display: none;
    cursor: pointer;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    display: block;
    background: var(--text);
    height: 2px;
    width: 25px;
    border-radius: 2px;
    position: relative;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after {
    content: '';
    position: absolute;
}
.nav-toggle-label span::before { top: -8px; }
.nav-toggle-label span::after  { top: 8px; }
.site-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
.site-nav a {
    color: var(--text);
    font-weight: 500;
    transition: color var(--transition);
}
.site-nav a:hover {
    color: var(--primary);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle-label { display: block; }
    .site-nav {
        position: absolute;
        top: 100%; left: 0;
        width: 50%;
        background: #fff;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition);
    }
    .nav-toggle:checked + .nav-toggle-label + .site-nav {
        max-height: 300px;
    }
    .site-nav ul { flex-direction: column; padding: 1rem; }
}

/* Hero Section */
.hero {
    background: linear-gradient(120deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 4rem 0;
}
.hero .container { text-align: center; }
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.25rem;
}

/* Detail Table Styles */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}
.detail-table th,
.detail-table td {
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}
.detail-table th {
    width: 40%;
    font-weight: 500;
    background: none;
}
.detail-table td {
    background: none;
}
.detail-table td input[type="text"] {
    width: 100%;
    border: none;
    background: transparent;
    font: inherit;
    color: var(--text);
}
.detail-table td input[type="checkbox"] {
    transform: scale(1.2);
    margin-top: 0.25rem;
}
.unit {
    margin-left: 0.5rem;
    color: var(--muted);
}
.page-title {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--primary);
    text-align: center;
}

/* Detail Form Layout */
.detail-form {
    display: grid;
    gap: 1rem 2rem;
    max-width: 450px;
    margin: 2rem auto;
}

.detail-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.5rem;
}

.detail-row label {
    font-weight: 500;
    color: var(--text);
}

.input-unit {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-unit input {
    flex: 1;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 0.5rem;
    text-align: right;
    background: var(--card-bg);
    color: var(--text);
    height: 2.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.input-unit .unit {
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    background: #e9ecef;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
}

.detail-row input[type="text"],
.detail-row input[type="date"] {
    width: 100%;
    padding: 0.5rem;
    text-align: right;
    direction: rtl;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--text);
    height: 2.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.detail-row input[type="checkbox"] {
    transform: scale(1.3);
}

.unit {
    color: var(--muted);
    margin-left: 0;
}

/* Block Titles */
.block-title {
    text-align: center;
    width: 100%;
    margin: 2rem 0 1rem;
    font-size: 1.75rem;
    color: #1478c7;
}

/* Make text bold in Well Name field */
.detail-row input#well-name {
    font-weight: bold;
}

/* Align Date fields to the right */
.detail-row input[type="date"] {
    width: auto;
    justify-self: end;
}

/* Guaranteed right alignment of text inside date fields */
.detail-row input[type="date"] {
    text-align: right !important;
}
.detail-row input[type="date"]::-webkit-datetime-edit-text,
.detail-row input[type="date"]::-webkit-datetime-edit-month-field,
.detail-row input[type="date"]::-webkit-datetime-edit-day-field,
.detail-row input[type="date"]::-webkit-datetime-edit-year-field {
    text-align: right !important;
}

/* Remove right padding from date fields so text is at right border */
.detail-row input[type="date"] {
    padding-right: 0;
}

/* Guaranteed right alignment of date field container */
.detail-row input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    display: flex !important;
    justify-content: flex-end !important;
}

/* Block Titles */
.block-title {
    text-align: center;
    width: 100%;
    margin: 2rem 0 1rem;
    font-size: 1.75rem;
    color: #1478c7;
}

/* Make text bold in Well Name field */
.detail-row input#well-name {
    font-weight: bold;
}

/* Align Date fields to the right */
.detail-row input[type="date"] {
    width: auto;
    justify-self: end;
}

/* Align text inside date fields */
.detail-row input[type="date"]::-webkit-datetime-edit-text,
.detail-row input[type="date"]::-webkit-datetime-edit-month-field,
.detail-row input[type="date"]::-webkit-datetime-edit-day-field,
.detail-row input[type="date"]::-webkit-datetime-edit-year-field {
    text-align: right;
}

.toggle-icon {
    content: '\25BE';
} 