@import url('dxp-brand-stylesheet.css');

:root {
    /* DXP Brand - Professional Navy Theme */
    --bg-primary: #00293d;          /* Deepest navy base */
    --bg-secondary: #0d3f56;        /* Mid-tone navy for alternating rows */
    --bg-card: #104d68;             /* Noticeably lighter card surfaces */
    --accent: #5D8CAA;              /* DXP Muted Blue - calmer accent */
    --accent-hover: #78A8BE;        /* Softer hover tone */
    --text-primary: #d9dee2;        /* Soft off-white */
    --text-secondary: #94999e;      /* Muted silver */
    --border: #2a7a9e;              /* Blue-tinted borders */
    --danger: #e74c3c;
    --danger-hover: #ff6b5a;
    --success: #44693D;             /* DXP Green */
    --warning: #F3D03E;             /* DXP Yellow */
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font-family-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(165deg, #00293d 0%, #003a54 40%, #00293d 100%);
    pointer-events: none;
    z-index: 0;
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: none;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        to right,
        #1a5570 0%,
        #1a5570 33%,
        #5D8CAA 33%,
        #5D8CAA 66%,
        #78A8BE 66%,
        #78A8BE 100%
    );
}

h1 {
    font-family: var(--font-family-condensed);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #d9dee2;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

h2 {
    font-family: var(--font-family-condensed);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    background: var(--bg-secondary);
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.tab {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-family-condensed);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(93, 140, 170, 0.1);
}

.tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
    background: rgba(93, 140, 170, 0.15);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #a8c8d8;
    font-family: var(--font-family-condensed);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control,
input[type="text"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-family-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus,
input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(93, 140, 170, 0.2);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 4px;
    font-family: var(--font-family-condensed);
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--accent);
    color: #eef1f3;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #00293d;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(93, 140, 170, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
}

.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(255, 107, 90, 0.5);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.items-list {
    margin-top: 2rem;
}

.item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.item:hover {
    border-left-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.item-content {
    flex: 1;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.item-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    text-align: center;
    border-top: 3px solid var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
    border-top-color: var(--accent-hover);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #a8c8d8;
    font-family: var(--font-family-condensed);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.validation-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* License page styles */
.search-box {
    margin-bottom: 1.5rem;
}

.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.license-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.license-table thead {
    background: #1a5570;
    border-bottom: 2px solid var(--accent);
}

.license-table th {
    padding: 1rem;
    text-align: left;
    font-family: var(--font-family-condensed);
    font-weight: 700;
    color: #d9dee2;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.license-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
}

.license-table tbody tr:hover {
    background: rgba(93, 140, 170, 0.08);
}

.license-table tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

.license-table tbody tr:nth-child(even):hover {
    background: rgba(93, 140, 170, 0.08);
}

.license-table td {
    padding: 1rem;
    vertical-align: top;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-email {
    font-weight: 600;
    color: var(--text-primary);
}

.user-cn {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: rgba(68, 105, 61, 0.25);
    color: #6abf5e;
}

.status-inactive {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.license-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.license-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-family-condensed);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.license-e5 {
    background: #1a5570;
    color: #d9dee2;
}

.license-e3 {
    background: #5D8CAA;
    color: #eef1f3;
}

.license-e1 {
    background: #78A8BE;
    color: #00293d;
}

.license-copilot {
    background: #78A8BE;
    color: #00293d;
}

.license-powerbi {
    background: #d4b834;
    color: #00293d;
}

.license-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    background: rgba(0, 165, 223, 0.1);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-weight: 700;
    font-family: var(--font-family-condensed);
    color: var(--accent);
}

.table-footer {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

.error-message {
    padding: 1rem;
    background: rgba(231, 76, 60, 0.12);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-left: 4px solid var(--danger);
    border-radius: 4px;
    color: #e74c3c;
    margin-bottom: 1.5rem;
}

.success-message {
    padding: 1rem;
    background: rgba(68, 105, 61, 0.15);
    border: 1px solid rgba(68, 105, 61, 0.3);
    border-left: 4px solid var(--success);
    border-radius: 4px;
    color: #6abf5e;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .tabs {
        overflow-x: auto;
    }

    .item {
        flex-direction: column;
        gap: 1rem;
    }

    .item-actions {
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .license-table {
        font-size: 0.8rem;
    }

    .license-table th,
    .license-table td {
        padding: 0.5rem;
    }

    .license-badges {
        flex-direction: column;
    }
}

/* License Price Display */
.price-line {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.price-line strong {
    color: #a8c8d8;
    font-weight: 600;
    position: relative;
    top: -1px;
}
