:root {
    --primary: #3b82f6;
    /* Blue 500 */
    --primary-dark: #2563eb;
    /* Blue 600 */
    --secondary: #64748b;
    /* Slate 500 */
    --bg-body: #f1f5f9;
    /* Slate 100 */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border: #e2e8f0;
    /* Slate 200 */

    --success: #10b981;
    /* Emerald 500 */
    --warning: #f59e0b;
    /* Amber 500 */
    --danger: #ef4444;
    /* Red 500 */
    --info: #3b82f6;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.25;
}

h1 {
    font-size: 1.5rem;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.125rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-small {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    background-color: #1e293b;
    /* Slate 800 */
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
}

header nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

header nav a {
    color: #cbd5e1;
    /* Slate 300 */
    font-size: 0.875rem;
    font-weight: 500;
}

header nav a:hover,
header nav a.active {
    color: white;
}

header button {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0;
}

header button:hover {
    color: white;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background-color: #f8fafc;
    /* Slate 50 */
}

.card-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-main);
}

.card-body,
.card>div:not(.card-header):not(table) {
    padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-warning .stat-value {
    color: var(--warning);
}

.stat-danger .stat-value {
    color: var(--danger);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

/* Domain Table Specific Styles */
.domain-table {
    width: 100%;
    border-collapse: collapse;
}

.domain-table th,
.domain-table td {
    padding: 1rem 1rem;
    text-align: left;
}

/* Keep these columns compact and non-wrapping */
.domain-table th:nth-child(3),
.domain-table td:nth-child(3),
/* Expiry Date */
.domain-table th:nth-child(4),
.domain-table td:nth-child(4),
/* Status */
.domain-table th:nth-child(5),
.domain-table td:nth-child(5),
/* Days Left */
.domain-table th:nth-child(6),
.domain-table td:nth-child(6)

/* Actions */
    {
    width: 1%;
    white-space: nowrap;
}

/* Allow Domain and Registrar to share the available space */
.domain-table td:nth-child(1) {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.domain-table td:nth-child(2) {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Expiry date with icon */
.expiry-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* Action buttons styling */
.action-buttons {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.btn-small {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    text-transform: none;
    border-radius: 0.25rem;
}

/* Progress bar container tweak */
.progress-container {
    min-width: 100px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active {
    background-color: #dcfce7;
    color: #166534;
}

.status-expired {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background-color: #fce7f3;
    color: #9d174d;
}

/* Progress Bars */
.progress-container {
    width: 100%;
    min-width: 120px;
    height: 0.625rem;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.25rem;
}

.progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-out;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-green {
    background-color: var(--success);
}

.progress-yellow {
    background-color: var(--warning);
}

.progress-orange {
    background-color: #fb923c;
}

.progress-red {
    background-color: var(--danger);
}

.progress-critical {
    background-color: var(--danger);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.25rem;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary,
.btn {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover,
.btn:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: white;
    border-color: var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-main);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    color: white;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.875rem;
    color: var(--text-main);
    transition: border-color 0.15s ease-in-out;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.w-full {
    width: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.justify-center {
    justify-content: center;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Mobile */
@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    th,
    td {
        padding: 0.75rem 1rem;
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Tag Input */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background-color: white;
    min-height: 42px;
}

.tag-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tag {
    background-color: #eff6ff;
    color: var(--primary-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #dbeafe;
}

.tag-remove {
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--primary);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-remove:hover {
    background-color: #dbeafe;
    color: var(--primary-dark);
}

.tag-input {
    border: none !important;
    padding: 0.25rem !important;
    margin: 0 !important;
    flex: 1;
    min-width: 60px;
    font-size: 0.875rem;
    box-shadow: none !important;
}

.tag-input:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Honeypot field - keeping it hidden from real users */
.website-url-field {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}