/*  
    File Name & Purpose: style.css - Apply modern UI to prjCRUD files
    Course Name: CSC235 Server-Side Development
    Project Name: prjCRUD
    Author: Kayla Marcus
    Email: marcusk@csp.edu
    Written: 2025-11-16
    Revised: N/A
*/

/* Base styles */
:root {
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-light: #6b7280;
    --accent: #3b82f6;
    --accent-light: #dbeafe;
    font-family: "Inter", sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 2rem;
    line-height: 1.6;
}

h1 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text);
}

/* Table container */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Table header */
th {
    background: var(--accent);
    color: white;
    padding: 12px 10px;
    font-weight: 500;
    text-align: left;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* Table cells */
td {
    padding: 12px 10px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

/* Zebra stripes */
tr:nth-child(even) td {
    background: #f3f4f6;
}

/* Hover effect */
tr:hover td {
    background: var(--accent-light);
    transition: 0.2s;
}

/* Links inside table */
td a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

/* Status messages from PHP (echo text) */
body > br + * {
    display: block;
    background: var(--accent-light);
    color: var(--text);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    font-size: 1.4rem;
}

/* Error message style */
strong {
    color: #b91c1c;
    font-weight: 600;
}

/* Page spacing for tables */
table + br {
    margin-bottom: 2rem;
}

/* Optional: Preformatted SQL output */
pre {
    background: #111827;
    color: #e5e7eb;
    padding: 1rem;
    border-radius: 8px;
    font-size: 14px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

/* Button */
a.button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #2563eb; /* modern blue */
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

a.button:hover {
    background: #1e4fcc;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

a.button:active {
    background: #1a45b0;
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* Explanation Section */
.explanation h2, .explanation p {
    max-width: 800px;
}

.explanation h2 {
    font-size: 1.4rem;
}

.explanation p {
    font-size: 1rem;
}

