@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #3b82f6;
    --accent-rgb: 59, 130, 246;
    --accent-hover: #2563eb;
    --text-primary: #f8fafc;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    background: radial-gradient(circle at top left, #1e1b4b 0%, #0f172a 100%) !important;
    font-family: 'Inter', sans-serif !important;
    color: var(--text-main) !important;
    margin: 0;
    text-align: center;
}

h2 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--accent);
}

h3 {
    font-size: 18px;
    margin-top: 0;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 14px;
}

p {
    margin: 0 0 16px 0;
    line-height: 1.6;
    color: var(--text-muted);
}

img {
    border: 0;
}

a:link, a:visited, a:active, a:hover {
    outline: none;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #60a5fa;
}

/* Layout Container */
div.d_container {
    margin: 0 auto;
    width: calc(100% - 48px);
    text-align: left;
    box-sizing: border-box;
}

div.d_header {
    height: 70px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 20px;
}

div.d_header ul {
    margin: 0;
    padding: 0;
    display: flex;
    list-style: none;
    align-items: center;
}

div.d_header ul li {
    margin-left: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

div.d_header ul li a:link, div.d_header ul li a:visited {
    color: var(--text-muted);
}

div.d_header ul li a:active, div.d_header ul li a:hover {
    color: var(--text-main);
}

/* Glass Card Component */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
    box-sizing: border-box;
    text-align: left;
}

/* Form layouts */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Grid Layouts */
.grid-2col {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 20px;
}

.grid-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 20px;
}

/* Widgets and Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-widget {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-widget:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

/* Content Page Layouts */
div.d_title {
    width: 100%;
    padding: 32px 0 12px 0;
    text-align: left;
}

div.d_title span {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

div.d_portfolio {
    width: 100%;
    padding: 10px 0 60px 0;
}

/* Styled Forms & Inputs */
input[type="text"], input[type="password"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--card-border) !important;
    border-radius: 8px !important;
    color: var(--text-main) !important;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

input[type="submit"], button, .btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    background: var(--accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="submit"]:hover, button:hover, .btn:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

input[type="submit"]:disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Modernized Tables */
table.t_main, table.t_contact {
    width: 100% !important;
    border-collapse: collapse !important;
    border: none !important;
    margin-bottom: 20px;
}

table.t_main th {
    background-color: rgba(15, 23, 42, 0.5) !important;
    color: var(--text-muted) !important;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none !important;
    border-bottom: 2px solid var(--card-border) !important;
    padding: 12px 16px !important;
    text-align: left;
}

table.t_main td, table.t_contact td {
    padding: 12px 16px !important;
    border: none !important;
    border-bottom: 1px solid var(--card-border) !important;
    color: var(--text-main) !important;
    background: transparent !important;
}

table.t_main tr:hover td {
    background: rgba(255, 255, 255, 0.02) !important;
}

table.t_main td.title {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #60a5fa !important;
    font-weight: 600;
}

table.t_main tr.green td {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #34d399 !important;
}

table.t_main tr.drag td {
    background-color: rgba(245, 158, 11, 0.15) !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}
.badge-cpc { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-cpm { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.badge-cpa { background: rgba(16, 185, 129, 0.15); color: #34d399; }

/* Left Sidebar Menu overrides */
div.d_left_menu {
    width: 220px !important;
    background: transparent !important;
    height: auto !important;
    float: left;
}

div.d_left_menu ul {
    margin: 0;
    padding: 0;
}

div.d_left_menu ul li {
    list-style: none;
}

div.d_left_menu ul li a:link, div.d_left_menu ul li a:visited {
    box-sizing: border-box;
    padding: 12px 16px !important;
    height: auto !important;
    color: var(--text-muted) !important;
    display: flex;
    align-items: center;
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100% !important;
}

div.d_left_menu ul li a:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-main) !important;
    text-decoration: none !important;
}

div.d_left_menu ul li a.active {
    background: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
    font-weight: 600;
    border-left: 3px solid var(--accent);
}

div.d_portfolio_items {
    width: 680px !important;
    padding-left: 30px !important;
    float: left;
    height: auto !important;
    overflow: visible !important;
}

/* Pagination bar */
div.d_pag {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--text-muted);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto !important;
    margin: 16px 0;
    box-sizing: border-box;
}

div.d_pag em {
    color: var(--text-muted);
}

div.d_pag a:link, div.d_pag a:visited {
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

div.d_pag a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

div.d_pag a.act:link, div.d_pag a.act:visited {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

br.br0, br[clear="all"], br[clear="both"] {
    display: none;
}

/* Footer layout rules */
div.d_footer_container {
    width: 100%;
    background: transparent !important;
    border-top: 1px solid var(--card-border);
    margin-top: 40px;
    padding: 20px 0;
}

div.d_footer {
    width: calc(100% - 48px);
    margin: 0 auto;
    color: var(--text-muted);
    box-sizing: border-box;
}

div.d_footer_line {
    color: var(--text-muted) !important;
}

div.d_footer_line a {
    color: var(--text-muted);
}

/* Notification System styling */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid var(--bg-dark);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#notification-dropdown {
    transform-origin: top right;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.notification-item {
    padding: 10px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}