/* ---------------------------------------------------------
   SYSTEM.CSS — Global CRM UI Framework
   Version: 0.2.0
   Updated: 2026-06-11
--------------------------------------------------------- */

/* ---------------------------------------------------------
   GLOBAL RESET
--------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #f5f5f5;                /* light global background */
    color: #1a1a1a;                     /* dark text */
    font-family: "Inter", sans-serif;
}

/* ---------------------------------------------------------
   PAGE WRAPPER
--------------------------------------------------------- */
.page-wrapper {
    width: 100%;
    padding: 20px;
}

.fade-in {
    animation: fadeIn .35s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------
   SYSTEM CARD (Unified across all admin pages)
--------------------------------------------------------- */
.system-card {
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 25px;
    margin: 40px auto;
    max-width: 1100px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

.system-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.system-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ---------------------------------------------------------
   TABLES
--------------------------------------------------------- */
.system-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

.system-table th,
.system-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #d0d0d0;
    color: #1a1a1a;
    text-align: left;
}

.system-table th {
    font-weight: 600;
    background: #f2f2f2;
}

.system-table tr:hover {
    background: #e9e9e9;
}

/* ---------------------------------------------------------
   ALERTS
--------------------------------------------------------- */
.system-alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.system-alert-danger {
    background: #fde7e7;
    border: 1px solid #dc3545;
    color: #7a1a1a;
}

.system-alert-info {
    background: #e7f1ff;
    border: 1px solid #2563eb;
    color: #0d3a7a;
}

/* ---------------------------------------------------------
   GLOBAL BUTTON SYSTEM
--------------------------------------------------------- */
.system-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        background-color .25s ease,
        color .25s ease,
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
    text-decoration: none;
    user-select: none;
}

.system-btn:hover {
    box-shadow: 0 0 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

/* Primary */
.system-btn-primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.system-btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* Outline */
.system-btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #c7c7c7;
}

.system-btn-outline:hover {
    background: #e9e9e9;
    border-color: #a0a0a0;
}

/* Danger */
.system-btn-danger {
    background: #b00020;
    color: #fff;
    border-color: #b00020;
}

.system-btn-danger:hover {
    background: #d00028;
    border-color: #d00028;
}

/* Small buttons */
.system-btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 4px;
}

/* Icon support */
.system-btn i {
    font-style: normal;
    font-size: 16px;
    line-height: 0;
}

/* ---------------------------------------------------------
   FORM ELEMENTS (added for edit.php)
--------------------------------------------------------- */

/* Plaintext read-only fields */
.form-control-plaintext {
    display: block;
    width: 100%;
    padding: 0.45rem 0.75rem;
    color: #444;
    line-height: 1.5;
}

/* Locked (non-editable) fields */
.field-locked {
    background-color: #fff7e6;          /* soft yellow */
    border: 1px dashed #e0a800;
    border-radius: 6px;
    padding: 0.45rem 0.75rem;
}

/* ---------------------------------------------------------
   BADGES
--------------------------------------------------------- */
.badge-current {
    background: #2563eb;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #fff;
}

/* ---------------------------------------------------------
   VERSION TEXT
--------------------------------------------------------- */
.version-text {
    margin-top: 20px;
    font-size: 12px;
    color: #777;
    text-align: center;
}
