/* Rewind Anti-Aging Systems - Standalone Stylesheet */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background: #f5f6fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: #2c7a5c; text-decoration: none; }
a:hover { color: #1a5c40; text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { color: #1a2332; font-weight: 600; }

/* Top Bar */
#header-top-bar {
    background: #1a2332;
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}
#header-top-bar-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#header-top-bar-left .top-bar-widgets {
    margin-right: 20px;
    color: #adb5bd;
}
#header-top-bar-right a {
    color: #adb5bd;
    margin-left: 10px;
    font-size: 15px;
}
#header-top-bar-right a:hover { color: #fff; }

/* Header / Navigation */
header#header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}
#header-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.logo a {
    font-size: 22px;
    font-weight: 700;
    color: #1a2332;
    text-decoration: none;
    display: flex;
    align-items: center;
}
.logo img {
    max-height: 45px;
    margin-right: 10px;
}
.logo .site-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2332;
}
.logo .site-subtitle {
    font-size: 11px;
    color: #6c757d;
    display: block;
}

/* Main Nav */
nav#navigation { display: flex; align-items: center; }
nav#navigation ul {
    list-style: none;
    display: flex;
    gap: 4px;
}
nav#navigation ul li a {
    display: block;
    padding: 8px 14px;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}
nav#navigation ul li a:hover,
nav#navigation ul li.active a {
    background: #e8f5ef;
    color: #2c7a5c;
}
nav#navigation ul li a.logout-btn {
    background: #dc3545;
    color: #fff;
    margin-left: 8px;
}
nav#navigation ul li a.logout-btn:hover {
    background: #c82333;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #1a2332;
    padding: 8px;
}

/* Page Content */
#content {
    flex: 1;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}
#page-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Page Titles */
.tatsu-action-content,
h2.tatsu-action-content,
h3.tatsu-action-content {
    text-align: center;
    color: #1a2332;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    float: none !important;
    clear: both;
}
td, th {
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}

/* Fix old align="left" on tables */
table[align="left"] {
    float: none !important;
    width: 100%;
}

/* Ensure page content clears floats */
#page-content::after,
section::after {
    content: "";
    display: table;
    clear: both;
}
th {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}
tr:hover td { background: #f8f9fa; }

/* Forms */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
    width: auto;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #495057;
    background: #fff;
    transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #2c7a5c;
    box-shadow: 0 0 0 3px rgba(44,122,92,0.15);
}

input[type="submit"],
button,
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: #2c7a5c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
input[type="submit"]:hover,
button:hover,
.btn:hover {
    background: #1a5c40;
}

/* Admin Center Cards */
.admin-section {
    margin-bottom: 30px;
}
.admin-section h3 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5ef;
    color: #1a2332;
}
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.admin-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: box-shadow 0.2s;
}
.admin-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.admin-card strong {
    display: block;
    font-size: 16px;
    margin-bottom: 12px;
    color: #1a2332;
}
.admin-card form {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-card label {
    font-size: 13px;
    color: #6c757d;
}

/* Separator */
hr.separator, hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 20px 0;
}

/* Special heading - override Tatsu */
.special-heading { text-align: center; }
.special-heading h2, .special-heading h3 {
    margin-bottom: 15px;
}

/* Footer */
footer#footer {
    background: #1a2332;
    color: #adb5bd;
    padding: 20px 0;
    margin-top: auto;
    text-align: center;
}
footer#footer a { color: #adb5bd; margin: 0 6px; }
footer#footer a:hover { color: #fff; }
.footer-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-left { font-size: 13px; }
.footer-right { font-size: 16px; }

/* Hide old Tatsu elements that don't render properly */
.tatsu-section-background-wrap,
.tatsu-column-bg-image-wrap,
.loader.page-loader,
#back-to-top,
.header-hero-section,
.header-search-controls,
.header-code-widgets,
.search-box-wrapper,
.mobile-nav-controller-wrap,
.header-mobile-navigation { display: none !important; }

/* Override Tatsu wrappers to not break layout */
.tatsu-section { margin: 0; padding: 0; }
.tatsu-section-pad { padding: 10px 0 !important; }
.tatsu-row-wrap, .tatsu-row, .tatsu-column, .tatsu-column-inner,
.tatsu-column-pad-wrap, .tatsu-column-pad { display: block; }

/* Data display tables */
table.data-table {
    width: 100%;
    border: 1px solid #dee2e6;
    margin: 15px 0;
}
table.data-table th {
    background: #2c7a5c;
    color: #fff;
    padding: 10px 12px;
    font-weight: 500;
}
table.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}
table.data-table tr:nth-child(even) td {
    background: #f8f9fa;
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    text-align: center;
}
.login-container h2 {
    margin-bottom: 30px;
    color: #1a2332;
}
.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
}
.login-container input[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    #header-wrap { height: auto; padding: 10px 20px; flex-wrap: wrap; }
    nav#navigation { display: none; width: 100%; }
    nav#navigation.active { display: flex; }
    nav#navigation ul { flex-direction: column; width: 100%; padding: 10px 0; }
    nav#navigation ul li a { padding: 10px 14px; }
    .mobile-nav-toggle { display: block; }
    .admin-grid { grid-template-columns: 1fr; }
    #header-top-bar { display: none; }
    .footer-wrap { flex-direction: column; gap: 10px; }
}
