/* --- Global Styles --- */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
}

/* --- Landing Page (index.php) --- */
.landing-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;

    background-image: url('landing.jpg');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: auto 100%;   /* 👈 key line */
}

.login-card {
    background: rgba(255, 255, 255, 0.96);
    padding: 45px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    margin: 0 0 5px 0;
    color: #2e7d32;
    letter-spacing: 3px;
    font-size: 2.4rem;
}

.login-card p {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 16px;
}

/* --- Dashboard Container Styles --- */
header {
    background-color: #2e7d32;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header a {
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 6px 15px;
    border-radius: 4px;
    transition: background 0.2s;
}

header a:hover {
    background: rgba(255,255,255,0.1);
}

.container {
    max-width: 1100px; /* Slightly wider to accommodate action buttons */
    margin: 2rem auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.note-form {
    display: flex;
    gap: 15px;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

/* --- Shared Input Styling --- */
input[type="text"], 
input[type="email"], 
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
}

/* --- Buttons (Standard) --- */
.btn-main, button[type="submit"] {
    padding: 14px;
    background-color: #4a773c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.3s;
}

.btn-main:hover, button[type="submit"]:hover {
    background-color: #385d2e;
}

/* --- Dashboard Action Alignment Fix --- */

/* Updated Action Cell Logic */
td.action-cell {
    width: 120px;            /* Fixed column width */
    text-align: center;
    vertical-align: middle;
}

.action-container {
    display: flex;
    flex-direction: column;  /* Stacks Update on top of Delete */
    gap: 8px;                /* Space between stacked buttons */
    align-items: stretch;    /* Makes them equal width */
}

/* Specific button styles for the dashboard table */
.btn-update {
    background-color: #4a773c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

.btn-update:hover {
    background-color: #385d2e;
}

.delete-link {
    background-color: #ffffff;
    color: #c62828;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    padding: 4px 12px;
    text-decoration: none;
    font-size: 12px;
    text-align: center;
    transition: all 0.2s;
}

.delete-link:hover {
    background-color: #fff5f5;
    border-color: #c62828;
}

/* Landing Page Action Buttons */
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.btn-sub {
    flex: 1;
    padding: 10px;
    background: #f8f9fa;
    color: #444;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sub:hover {
    background: #e9ecef;
}

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

th {
    text-align: left;
    background-color: #f9fbf9;
    color: #2e7d32;
    padding: 15px;
    border-bottom: 2px solid #2e7d32;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

/* Fixed Row Logic */
.row-fixed {
    background-color: #fcfcfc;
    color: #888;
}

.row-fixed td {
    font-style: italic;
}