/* Main Premium Design CSS */

/* --- 1. Variables & Theme --- */
:root {
    /* Color Palette */
    --primary-brown: #3E2723;
    /* Deep Coffee */
    --primary-light: #5D4037;
    /* Lighter Coffee */
    --secondary-gold: #FFB300;
    /* Amber Gold */
    --secondary-orange: #FF6F00;
    /* Dark Orange */
    --accent-blue: #0288D1;
    /* Sky Blue for contrast */
    --bg-cream: #F5F5F5;
    /* Light Cream Background */
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);

    /* Text */
    --text-main: #212121;
    --text-muted: #757575;
    --text-light: #FAFAFA;

    /* Effects */
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);

    /* Status Colors */
    --success: #4CAF50;
    --danger: #F44336;
    --warning: #FF9800;
    --info: #2196F3;
}

/* --- 2. Reset & Typography --- */
html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Kanit', sans-serif;
    background: var(--bg-cream);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* --- 3. Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    animation: fadeIn 0.8s ease-out;
}

@media (min-width: 992px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
        gap: 30px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 4. Header & Hero --- */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--glass-border);
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-brown), var(--secondary-gold), var(--primary-brown));
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-brown);
    margin: 0;
    font-weight: 700;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-orange);
    font-weight: 500;
    margin-top: 5px;
}

.top-date {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 15px;
    display: inline-block;
    padding: 6px 18px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 30px;
}

/* --- 5. Cards & Components --- */
.card {
    background: var(--glass-bg);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.card-header {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.3rem;
    color: var(--primary-brown);
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title i {
    color: var(--secondary-orange);
    background: rgba(255, 111, 0, 0.08);
    /* faint orange bg */
    padding: 8px;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* Buttons */
.btn-submit {
    background: linear-gradient(135deg, var(--secondary-orange), var(--secondary-gold));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 5px 15px rgba(255, 111, 0, 0.25);
    margin-top: 10px;
}

.btn-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 111, 0, 0.35);
}

/* Inputs */
input[type="text"],
textarea {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.3s;
    box-sizing: border-box;
    margin-bottom: 15px;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--secondary-orange);
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 111, 0, 0.1);
}

/* --- 6. Special Widgets --- */

/* Weather */
.weather-card {
    background: linear-gradient(135deg, #29B6F6 0%, #0288D1 100%);
    color: white;
    border: none;
}

.weather-card .card-title,
.weather-card .card-title i,
.weather-card i,
.weather-card span {
    color: white !important;
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.weather-grid {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 10px;
}

.city-box span {
    font-size: 0.8rem;
    opacity: 0.9;
}

.city-box strong {
    font-size: 1.2rem;
    display: block;
}

.city-box:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

/* Message Board */
.message-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.message-item {
    background: white;
    border-left: 5px solid var(--secondary-orange);
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

.message-item:hover {
    transform: translateX(5px);
}

/* Lucky & Emergency */
.emergency-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.emergency-item {
    background: #FFEBEE;
    color: #D32F2F;
    padding: 15px 10px;
    border-radius: 12px;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.emergency-item:hover {
    background: #FFCDD2;
    transform: translateY(-2px);
}

.emergency-item strong {
    display: block;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

/* Owner Profile */
.owner-profile {
    text-align: center;
}

.owner-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

.owner-img:hover {
    transform: rotate(3deg) scale(1.05);
}

.owner-quote {
    background: #f0f0f0;
    padding: 20px;
    border-radius: 12px;
    font-style: italic;
    color: var(--text-muted);
    margin-top: 15px;
    position: relative;
}

/* Tides */
.tide-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tide-icon-up {
    color: var(--success);
}

.tide-icon-down {
    color: var(--danger);
}

/* Rates & Data Rows */
.data-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px dashed #eee;
    font-size: 1.05rem;
}

.data-row .price-val {
    font-weight: 700;
    color: var(--primary-brown);
    background: #eceff1;
    padding: 2px 10px;
    border-radius: 6px;
}

.rate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.rate-table th {
    text-align: left;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.85rem;
    padding-bottom: 10px;
}

.rate-table td {
    padding: 12px 5px;
    border-bottom: 1px dashed #eee;
}

.currency-flag {
    font-size: 1.2rem;
    margin-right: 5px;
}

/* Phone Link in Sidebar (index.php:344) */
a[href^="tel"] {
    text-decoration: none;
    color: inherit;
}

/* Footer Credit */
.footer-credit {
    background: var(--primary-brown);
    color: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(62, 39, 35, 0.3);
}

/* --- 7. Footer --- */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}