/* =========================
   GLOBAL RESET
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* =========================
   GLOBAL PAGE
   ========================= */
html, body {
    height: 100%;
    overflow: hidden; /* NO SCROLLING */
    background: #eef0f6;
}

/* =========================
   AUTH PAGES (LOGIN & REGISTER)
   ========================= */
.auth-bg {
    min-height: 100vh;
    background: #95989e;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-card {
    background: #ffffff;
    width: 420px;
    padding: 40px 36px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.auth-card h2 {
    font-size: 28px;
    margin-bottom: 6px;
    color: #1f2937;
}

.subtitle {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 26px;
}

.auth-card form {
    display: flex;
    flex-direction: column;
}

.auth-card label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.auth-card input {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 15px;
    margin-bottom: 18px;
}

.auth-card input:focus {
    outline: none;
    border-color: #6b2bd9;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 18px;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.switch {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
}

.switch a {
    color: #6b2bd9;
    font-weight: 600;
    text-decoration: none;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
    border: none;
    cursor: pointer;
    font-weight: 700;
    border-radius: 10px;
    font-size: 15px;
}

.btn.primary {
    background: #6b2bd9;
    color: white;
    padding: 12px 28px;
}

.btn.primary:hover {
    background: #5a22c4;
}

.btn-back {
    display: inline-block;
    margin-top: 15px;
    background: #e5e7eb;
    color: #111;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

/* =========================
   ADD / EDIT / VIEW CONTACT
   ========================= */
.page-wrapper {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 95%;
    max-width: 1100px;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: calc(100vh - 40px);
    overflow: hidden;
}

.container h1,
.container h2 {
    text-align: center;
    margin-bottom: 25px;
}

/* FORM GRID */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px; /* spacing so inputs DO NOT touch */
}

.full-width {
    grid-column: span 3;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
}

textarea {
    resize: none;
    height: 90px;
}

/* BUTTON AREA */
.button-area {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* SAVE BUTTON */
.btn-save {
    background: #4b3f91;
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    width: auto;
}

/* =========================
   DASHBOARD TABLE
   ========================= */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table th,
table td {
    padding: 10px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

table th {
    background: #f3f4f6;
}

/* ACTION BUTTONS */
.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    color: white;
}

.action-view { background: #6b7280; }
.action-edit { background: #4b3f72; }
.action-delete { background: #b91c1c; }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .full-width {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .full-width {
        grid-column: span 1;
    }
}
